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

11 lines
460 B
Smarty

{{/*
Validate Deployment values
*/}}
{{- define "bjw-s.common.lib.deployment.validate" -}}
{{- $rootContext := .rootContext -}}
{{- $deploymentValues := .object -}}
{{- if and (ne $deploymentValues.strategy "Recreate") (ne $deploymentValues.strategy "RollingUpdate") -}}
{{- fail (printf "Not a valid strategy type for Deployment. (controller: %s, strategy: %s)" $deploymentValues.identifier $deploymentValues.strategy) }}
{{- end -}}
{{- end -}}