k8s/helm-charts/dashy/charts/common/templates/lib/webhook/_clientConfig.tpl
root 1eaf295724
Some checks failed
continuous-integration/drone/push Build is failing
new way of doin
2023-11-16 19:42:02 +10:00

23 lines
728 B
Smarty

{{- define "tc.v1.common.lib.webhook.clientConfig" -}}
{{- $clientConfig := .clientConfig -}}
{{- $rootCtx := .rootCtx }}
clientConfig:
{{- if $clientConfig.caBundle }}
caBundle: {{ tpl $clientConfig.caBundle $rootCtx | quote }}
{{- end -}}
{{- if $clientConfig.url }}
url: {{ tpl $clientConfig.url $rootCtx | quote }}
{{- end -}}
{{- if $clientConfig.service }}
service:
name: {{ tpl $clientConfig.service.name $rootCtx }}
namespace: {{ tpl $clientConfig.service.namespace $rootCtx }}
{{- with $clientConfig.service.path }}
path: {{ tpl . $rootCtx | quote }}
{{- end -}}
{{- with $clientConfig.service.port }}
port: {{ tpl . $rootCtx }}
{{- end -}}
{{- end -}}
{{- end -}}