mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-03 16:37:04 +02:00
* fix(common): fix incorrect route default values (#91) * fix(common): make `sectionName` optional for route parentRefs * fix(common): name primary route correctly * feat(common): add controller.type of cronjob (#87) * fix(common): Fix invalid persistence type message (#85) * feat(common): Allow setting container restartPolicy Co-authored-by: András Maróy <andras@maroy.hu> Co-authored-by: loeken <loeken@internetz.me> Co-authored-by: Han Cen <hi@chamburr.com>
18 lines
703 B
Smarty
18 lines
703 B
Smarty
{{/* Renders the Route objects required by the chart */}}
|
|
{{- define "bjw-s.common.render.routes" -}}
|
|
{{- /* Generate named routes as required */ -}}
|
|
{{- range $name, $route := .Values.route }}
|
|
{{- if $route.enabled -}}
|
|
{{- $routeValues := $route -}}
|
|
|
|
{{/* set defaults */}}
|
|
{{- if and (not $routeValues.nameOverride) (ne $name (include "bjw-s.common.lib.route.primary" $)) -}}
|
|
{{- $_ := set $routeValues "nameOverride" $name -}}
|
|
{{- end -}}
|
|
|
|
{{- $_ := set $ "ObjectValues" (dict "route" $routeValues) -}}
|
|
{{- include "bjw-s.common.class.route" $ | nindent 0 -}}
|
|
{{- $_ := unset $.ObjectValues "route" -}}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|