mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47: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
18
charts/library/common/templates/lib/controller/_validate.tpl
Normal file
18
charts/library/common/templates/lib/controller/_validate.tpl
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{/*
|
||||
Validate controller values
|
||||
*/}}
|
||||
{{- define "bjw-s.common.lib.controller.validate" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $controllerValues := .object -}}
|
||||
|
||||
{{- $allowedControllerTypes := list "deployment" "daemonset" "statefulset" "cronjob" -}}
|
||||
{{- if not (has $controllerValues.type $allowedControllerTypes) -}}
|
||||
{{- fail (printf "Not a valid controller.type (%s)" $controllerValues.type) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $enabledContainers := include "bjw-s.common.lib.controller.enabledContainers" (dict "rootContext" $rootContext "controllerObject" $controllerValues) | fromYaml }}
|
||||
{{- /* Validate at least one container is enabled */ -}}
|
||||
{{- if not $enabledContainers -}}
|
||||
{{- fail (printf "No containers enabled for controller (%s)" $controllerValues.identifier) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue