3eeaea10af
* Setup dynamic portal config map. - Includes tests * Add portal docs * Update charts/calibre-web/2.0.0/questions.yaml Co-authored-by: Troy Prelog <35702532+tprelog@users.noreply.github.com> * Fix feedback from @stavros-k * Update charts/jackett/2.0.0/test_values.yaml * Update charts/jackett/2.0.0/test_values.yaml * Update charts/zwavejs2mqtt/2.0.0/questions.yaml Co-authored-by: Troy Prelog <35702532+tprelog@users.noreply.github.com> * Update charts/home-assistant/2.0.0/questions.yaml Co-authored-by: Troy Prelog <35702532+tprelog@users.noreply.github.com> * Update charts/esphome/2.0.0/questions.yaml Co-authored-by: Troy Prelog <35702532+tprelog@users.noreply.github.com> * Update charts/handbrake/2.0.0/questions.yaml Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Troy Prelog <35702532+tprelog@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
45 lines
1.6 KiB
Smarty
45 lines
1.6 KiB
Smarty
{{/*
|
|
Renders the Service objects required by the chart by returning a concatinated list
|
|
of the main Service and any additionalServices.
|
|
*/}}
|
|
{{- define "common.services" -}}
|
|
{{- if .Values.services -}}
|
|
{{- /* Add dict of primary services */ -}}
|
|
{{- range $name, $service := .Values.services }}
|
|
{{- if or ( $service.enabled ) ( eq $name "main" ) -}}
|
|
{{- print ("---") | nindent 0 -}}
|
|
{{- print ("\n") | nindent 0 -}}
|
|
{{- $serviceValues := $service -}}
|
|
{{- /* Dont add name suffix for primary service named "main" */ -}}
|
|
{{- if or (not $serviceValues.nameSuffix) ( ne $name "main" ) -}}
|
|
{{- $_ := set $serviceValues "nameSuffix" $name -}}
|
|
{{ end -}}
|
|
{{- $_ := set $ "ObjectValues" (dict "service" $serviceValues) -}}
|
|
{{- include "common.classes.service" $ -}}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
|
|
{{- if .Values.additionalServices -}}
|
|
{{- /* Generate additional services as required */ -}}
|
|
{{- range $index, $extraService := .Values.additionalServices }}
|
|
{{- if $extraService.enabled -}}
|
|
{{- print ("---") | nindent 0 -}}
|
|
{{- $serviceValues := $extraService -}}
|
|
|
|
{{- $name := ( $index | quote ) -}}
|
|
{{- if $serviceValues.name -}}
|
|
{{- $name := $serviceValues.name -}}
|
|
{{- end }}
|
|
|
|
{{- if or (not $serviceValues.nameSuffix) ( ne $name "main" ) -}}
|
|
{{- $_ := set $serviceValues "nameSuffix" $name -}}
|
|
{{ end -}}
|
|
{{- $_ := set $ "ObjectValues" (dict "service" $serviceValues) -}}
|
|
{{- include "common.classes.service" $ -}}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|