mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
11 lines
460 B
Smarty
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 -}}
|