From 38b2e99d770878ef09940caa3fa394db048a9a6a Mon Sep 17 00:00:00 2001 From: Dan Fuchs Date: Wed, 8 Jan 2025 17:17:48 -0600 Subject: [PATCH] DM-48365: mobu - Inject availableServices in the ArgoCD Application --- environments/templates/_helpers.tpl | 8 ++++++++ .../templates/applications/infrastructure/mobu.yaml | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/environments/templates/_helpers.tpl b/environments/templates/_helpers.tpl index d35e9eec47..efd91b1732 100644 --- a/environments/templates/_helpers.tpl +++ b/environments/templates/_helpers.tpl @@ -4,3 +4,11 @@ {{- if $enabled }}@{{ $app }}{{ end }} {{- end }} {{- end }} + +{{- define "enabledServicesYamlList" }} +{{- range $app, $enabled := .Values.applications }} + {{- if $enabled }} +- {{ $app | quote }} + {{- end }} +{{- end }} +{{- end -}} diff --git a/environments/templates/applications/infrastructure/mobu.yaml b/environments/templates/applications/infrastructure/mobu.yaml index 8ac75ca7d2..cdcd785b4e 100644 --- a/environments/templates/applications/infrastructure/mobu.yaml +++ b/environments/templates/applications/infrastructure/mobu.yaml @@ -31,4 +31,8 @@ spec: valueFiles: - "values.yaml" - "values-{{ .Values.name }}.yaml" + valuesObject: + config: + availableServices: + {{- include "enabledServicesYamlList" . | nindent 12 }} {{- end -}}