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,41 @@
{{/*
Renders the controller objects required by the chart.
*/}}
{{- define "bjw-s.common.render.controllers" -}}
{{- /* Generate named controller objects as required */ -}}
{{- range $key, $controller := .Values.controllers -}}
{{- /* Enable controller by default, but allow override */ -}}
{{- $controllerEnabled := true -}}
{{- if hasKey $controller "enabled" -}}
{{- $controllerEnabled = $controller.enabled -}}
{{- end -}}
{{- if $controllerEnabled -}}
{{- $controllerValues := $controller -}}
{{- /* Create object from the raw controller values */ -}}
{{- $controllerObject := (include "bjw-s.common.lib.controller.valuesToObject" (dict "rootContext" $ "id" $key "values" $controllerValues)) | fromYaml -}}
{{- /* Perform validations on the controller before rendering */ -}}
{{- include "bjw-s.common.lib.controller.validate" (dict "rootContext" $ "object" $controllerObject) -}}
{{- if eq $controllerObject.type "deployment" -}}
{{- $deploymentObject := (include "bjw-s.common.lib.deployment.valuesToObject" (dict "rootContext" $ "id" $key "values" $controllerObject)) | fromYaml -}}
{{- include "bjw-s.common.lib.deployment.validate" (dict "rootContext" $ "object" $deploymentObject) -}}
{{- include "bjw-s.common.class.deployment" (dict "rootContext" $ "object" $deploymentObject) | nindent 0 -}}
{{- else if eq $controllerObject.type "cronjob" -}}
{{- $cronjobObject := (include "bjw-s.common.lib.cronjob.valuesToObject" (dict "rootContext" $ "id" $key "values" $controllerObject)) | fromYaml -}}
{{- include "bjw-s.common.lib.cronjob.validate" (dict "rootContext" $ "object" $cronjobObject) -}}
{{- include "bjw-s.common.class.cronjob" (dict "rootContext" $ "object" $cronjobObject) | nindent 0 -}}
{{- else if eq $controllerObject.type "daemonset" -}}
{{- $daemonsetObject := (include "bjw-s.common.lib.daemonset.valuesToObject" (dict "rootContext" $ "id" $key "values" $controllerObject)) | fromYaml -}}
{{- include "bjw-s.common.lib.daemonset.validate" (dict "rootContext" $ "object" $daemonsetObject) -}}
{{- include "bjw-s.common.class.daemonset" (dict "rootContext" $ "object" $daemonsetObject) | nindent 0 -}}
{{- else if eq $controllerObject.type "statefulset" -}}
{{- $statefulsetObject := (include "bjw-s.common.lib.statefulset.valuesToObject" (dict "rootContext" $ "id" $key "values" $controllerObject)) | fromYaml -}}
{{- include "bjw-s.common.lib.statefulset.validate" (dict "rootContext" $ "object" $statefulsetObject) -}}
{{- include "bjw-s.common.class.statefulset" (dict "rootContext" $ "object" $statefulsetObject) | nindent 0 -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}