mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
15 lines
451 B
Smarty
15 lines
451 B
Smarty
{{/*
|
|
Validate Ingress values
|
|
*/}}
|
|
{{- define "bjw-s.common.lib.ingress.validate" -}}
|
|
{{- $rootContext := .rootContext -}}
|
|
{{- $ingressValues := .object -}}
|
|
|
|
{{- range $ingressValues.hosts -}}
|
|
{{- range .paths -}}
|
|
{{- if empty (dig "service" "name" nil .) -}}
|
|
{{- fail (printf "No service name configured. (ingress: %s, path: %s)" $ingressValues.identifier .path) -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|