feat(common): Release version 2.0.0-beta.1 (#173)

This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2023-09-13 11:24:23 +02:00 committed by GitHub
parent 19767d668c
commit 7b6ee00be6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
189 changed files with 3110 additions and 3023 deletions

View file

@ -0,0 +1,23 @@
{{/*
Validate StatefulSet values
*/}}
{{- define "bjw-s.common.lib.statefulset.validate" -}}
{{- $rootContext := .rootContext -}}
{{- $statefulsetValues := .object -}}
{{- if and (ne $statefulsetValues.strategy "OnDelete") (ne $statefulsetValues.strategy "RollingUpdate") -}}
{{- fail (printf "Not a valid strategy type for StatefulSet. (controller: %s, strategy: %s)" $statefulsetValues.identifier $statefulsetValues.strategy) -}}
{{- end -}}
{{- if not (empty (dig "statefulset" "volumeClaimTemplates" "" $statefulsetValues)) -}}
{{- range $index, $volumeClaimTemplate := $statefulsetValues.statefulset.volumeClaimTemplates -}}
{{- if empty (get . "size") -}}
{{- fail (printf "size is required for volumeClaimTemplate. (controller: %s, volumeClaimTemplate: %s)" $statefulsetValues.identifier $volumeClaimTemplate.name) -}}
{{- end -}}
{{- if empty (get . "accessMode") -}}
{{- fail (printf "accessMode is required for volumeClaimTemplate. (controller: %s, volumeClaimTemplate: %s)" $statefulsetValues.identifier $volumeClaimTemplate.name) -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}