mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common)!: Release v3.0.0-beta2 (#280)
This commit is contained in:
parent
23ae8131da
commit
21e751bc16
51 changed files with 419 additions and 368 deletions
|
@ -0,0 +1,23 @@
|
|||
{{/*
|
||||
Return the enabled controllers.
|
||||
*/}}
|
||||
{{- define "bjw-s.common.lib.controller.enabledControllers" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $enabledControllers := dict -}}
|
||||
|
||||
{{- range $name, $controller := $rootContext.Values.controllers -}}
|
||||
{{- if kindIs "map" $controller -}}
|
||||
{{- /* Enable by default, but allow override */ -}}
|
||||
{{- $controllerEnabled := true -}}
|
||||
{{- if hasKey $controller "enabled" -}}
|
||||
{{- $controllerEnabled = $controller.enabled -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $controllerEnabled -}}
|
||||
{{- $_ := set $enabledControllers $name . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $enabledControllers | toYaml -}}
|
||||
{{- end -}}
|
|
@ -17,7 +17,8 @@ Convert controller values to an object
|
|||
{{- if $objectValues.nameOverride -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $objectValues.nameOverride -}}
|
||||
{{- else -}}
|
||||
{{- if ne $identifier "main" -}}
|
||||
{{- $enabledControllers := (include "bjw-s.common.lib.controller.enabledControllers" (dict "rootContext" $rootContext) | fromYaml ) }}
|
||||
{{- if gt (len $enabledControllers) 1 -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $identifier -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue