helm-charts/charts/apps/k8s-ycl/templates/_helpers.tpl
2023-07-28 10:10:27 +02:00

37 lines
1.1 KiB
Smarty

{{- define "k8s-ycl.webhookPort" -}}
9443
{{- end -}}
{{- define "k8s-ycl.webhookPath" -}}
/mutate--v1-pod
{{- end -}}
{{- define "k8s-ycl.ignoredNamespaces" -}}
{{- $ownNamespace := $.Release.Namespace -}}
{{- $ignoredNamespaces := list -}}
{{- if $.Values.webhook.ignoreOwnNamespace -}}
{{- $ignoredNamespaces = append $ignoredNamespaces $ownNamespace -}}
{{- end -}}
{{- with $.Values.webhook.ignoredNamespaces -}}
{{- range . -}}
{{- $ignoredNamespaces = append $ignoredNamespaces . -}}
{{- end -}}
{{- end -}}
{{- $ignoredNamespaces | uniq | toYaml -}}
{{- end -}}
{{- define "k8s-ycl.selfSignedIssuer" -}}
{{ printf "%s-webhook-selfsign" (include "bjw-s.common.lib.chart.names.fullname" .) }}
{{- end -}}
{{- define "k8s-ycl.rootCAIssuer" -}}
{{ printf "%s-webhook-ca" (include "bjw-s.common.lib.chart.names.fullname" .) }}
{{- end -}}
{{- define "k8s-ycl.rootCACertificate" -}}
{{ printf "%s-webhook-ca" (include "bjw-s.common.lib.chart.names.fullname" .) }}
{{- end -}}
{{- define "k8s-ycl.servingCertificate" -}}
{{ printf "%s-webhook-tls" (include "bjw-s.common.lib.chart.names.fullname" .) }}
{{- end -}}