mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47: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 -}}
|
Loading…
Add table
Add a link
Reference in a new issue