helm-charts/charts/library/common/templates/lib/ingress/_validate.tpl
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs b360c9885a
feat(common): Release v2.1.0 (#221)
Co-authored-by: Christopher Larivière <lariviere.c@gmail.com>
2023-11-10 15:46:55 +01:00

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 -}}