mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release 3.7.3 (#393)
This commit is contained in:
parent
ade6955579
commit
245e1631c9
14 changed files with 167 additions and 99 deletions
|
@ -0,0 +1,23 @@
|
|||
{{/*
|
||||
Return the enabled routes.
|
||||
*/}}
|
||||
{{- define "bjw-s.common.lib.route.enabledRoutes" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $enabledRoutes := dict -}}
|
||||
|
||||
{{- range $name, $route := $rootContext.Values.route -}}
|
||||
{{- if kindIs "map" $route -}}
|
||||
{{- /* Enable Route by default, but allow override */ -}}
|
||||
{{- $routeEnabled := true -}}
|
||||
{{- if hasKey $route "enabled" -}}
|
||||
{{- $routeEnabled = $route.enabled -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $routeEnabled -}}
|
||||
{{- $_ := set $enabledRoutes $name . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $enabledRoutes | toYaml -}}
|
||||
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue