2021-02-05 20:17:06 +00:00
|
|
|
{{/*
|
|
|
|
Renders the Service objects required by the chart by returning a concatinated list
|
|
|
|
of the main Service and any additionalServices.
|
|
|
|
*/}}
|
|
|
|
{{- define "common.service" -}}
|
|
|
|
{{- if .Values.service.enabled -}}
|
|
|
|
{{- /* Generate primary service */ -}}
|
|
|
|
{{- include "common.classes.service" . }}
|
2021-02-16 13:19:50 +00:00
|
|
|
|
2021-02-05 20:17:06 +00:00
|
|
|
{{- /* Generate additional services as required */ -}}
|
|
|
|
{{- range $index, $extraService := .Values.service.additionalServices }}
|
|
|
|
{{- if $extraService.enabled -}}
|
|
|
|
{{- print ("---") | nindent 0 -}}
|
|
|
|
{{- $serviceValues := $extraService -}}
|
|
|
|
{{- if not $serviceValues.nameSuffix -}}
|
|
|
|
{{- $_ := set $serviceValues "nameSuffix" $index -}}
|
|
|
|
{{ end -}}
|
|
|
|
{{- $_ := set $ "ObjectValues" (dict "service" $serviceValues) -}}
|
|
|
|
{{- include "common.classes.service" $ -}}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|