helm-charts/charts/library/common/templates/lib/ingress/_validate.tpl
2023-09-13 11:24:23 +02:00

15 lines
475 B
Smarty

{{/*
Validate Ingress values
*/}}
{{- define "bjw-s.common.lib.ingress.validate" -}}
{{- $rootContext := .rootContext -}}
{{- $ingressValues := .object -}}
{{- range $ingressValues.hosts -}}
{{- range .paths -}}
{{- if or (eq (dig "service" "name" "" .) "") (not .service.name) -}}
{{- fail (printf "No service name configured. (ingress: %s, path: %s)" $ingressValues.identifier .path) -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}