mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release version 2.0.0-beta.1 (#173)
This commit is contained in:
parent
19767d668c
commit
7b6ee00be6
189 changed files with 3110 additions and 3023 deletions
11
charts/library/common/templates/lib/deployment/_validate.tpl
Normal file
11
charts/library/common/templates/lib/deployment/_validate.tpl
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{/*
|
||||
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 -}}
|
|
@ -0,0 +1,14 @@
|
|||
{{/*
|
||||
Convert Deployment values to an object
|
||||
*/}}
|
||||
{{- define "bjw-s.common.lib.deployment.valuesToObject" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $identifier := .id -}}
|
||||
{{- $objectValues := .values -}}
|
||||
|
||||
{{- $strategy := default "Recreate" $objectValues.strategy -}}
|
||||
{{- $_ := set $objectValues "strategy" $strategy -}}
|
||||
|
||||
{{- /* Return the Deployment object */ -}}
|
||||
{{- $objectValues | toYaml -}}
|
||||
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue