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

11 lines
376 B
Smarty

{{/*
Validate serviceMonitor values
*/}}
{{- define "bjw-s.common.lib.serviceMonitor.validate" -}}
{{- $rootContext := .rootContext -}}
{{- $serviceMonitorObject := .object -}}
{{- if not $serviceMonitorObject.endpoints -}}
{{- fail (printf "endpoints are required for serviceMonitor with key \"%v\"" $serviceMonitorObject.identifier) -}}
{{- end -}}
{{- end -}}