mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
Co-authored-by: lab-assistant[bot] <180935599+lab-assistant[bot]@users.noreply.github.com>
19 lines
952 B
Smarty
19 lines
952 B
Smarty
{{/*
|
|
Renders the Service objects required by the chart.
|
|
*/}}
|
|
{{- define "bjw-s.common.render.services" -}}
|
|
{{- $rootContext := $ -}}
|
|
|
|
{{- /* Generate named Services as required */ -}}
|
|
{{- $enabledServices := (include "bjw-s.common.lib.service.enabledServices" (dict "rootContext" $rootContext) | fromYaml ) -}}
|
|
{{- range $identifier := keys $enabledServices -}}
|
|
{{- /* Generate object from the raw service values */ -}}
|
|
{{- $serviceObject := (include "bjw-s.common.lib.service.getByIdentifier" (dict "rootContext" $rootContext "id" $identifier) | fromYaml) -}}
|
|
|
|
{{- /* Perform validations on the Service before rendering */ -}}
|
|
{{- include "bjw-s.common.lib.service.validate" (dict "rootContext" $rootContext "object" $serviceObject) -}}
|
|
|
|
{{- /* Include the Service class */ -}}
|
|
{{- include "bjw-s.common.class.service" (dict "rootContext" $rootContext "object" $serviceObject) | nindent 0 -}}
|
|
{{- end -}}
|
|
{{- end -}}
|