From 0405b2f7abe53eb00073e184f3059505655e805b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20G=C3=B3mez?= <64421371+lukasgomez@users.noreply.github.com> Date: Thu, 2 May 2024 11:32:15 +0200 Subject: [PATCH] Argo cd bootstrap parameters (#134) * Enabled the use of parameters in ArgoCD applications * Update Chart.yaml --- charts/argocd-app-bootstrap/Chart.yaml | 2 +- .../templates/application.yaml | 8 ++++ charts/argocd-app-bootstrap/values.yaml | 46 +++++++++---------- 3 files changed, 32 insertions(+), 24 deletions(-) diff --git a/charts/argocd-app-bootstrap/Chart.yaml b/charts/argocd-app-bootstrap/Chart.yaml index 0f7e25a..212bcaa 100644 --- a/charts/argocd-app-bootstrap/Chart.yaml +++ b/charts/argocd-app-bootstrap/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 appVersion: "1.0.0" description: Helm chart to automatically provision ArgoCD application and projects name: argocd-app-bootstrap -version: 1.0.17 +version: 1.0.18 diff --git a/charts/argocd-app-bootstrap/templates/application.yaml b/charts/argocd-app-bootstrap/templates/application.yaml index 967330f..dba7243 100644 --- a/charts/argocd-app-bootstrap/templates/application.yaml +++ b/charts/argocd-app-bootstrap/templates/application.yaml @@ -44,6 +44,10 @@ spec: {{- range .externalValuesFiles }} - {{ . }} {{- end }} + {{- if .parameters }} + parameters: + {{- .parameters | toYaml | nindent 8 }} + {{- end }} {{- else }} repoURL: "{{ $.Values.repoURL }}" targetRevision: "{{ $.Values.targetRevision }}" @@ -54,6 +58,10 @@ spec: {{- range .extraValuesFiles }} - {{ . }} {{- end }} + {{- if .parameters }} + parameters: + {{- .parameters | toYaml | nindent 8 }} + {{- end }} {{- end }} destination: server: https://kubernetes.default.svc diff --git a/charts/argocd-app-bootstrap/values.yaml b/charts/argocd-app-bootstrap/values.yaml index 7f4cf89..19f2d88 100644 --- a/charts/argocd-app-bootstrap/values.yaml +++ b/charts/argocd-app-bootstrap/values.yaml @@ -23,26 +23,26 @@ projects: destinations: [] sourceRepos: [] adminGroups: [] -# my-project: -# adminGroups: -# - admin@example.com -# applications: -# - name: app-name -# enabled: true -# isExternalApp: true -# externalRepoURL: external-repo-URL -# externalTargetRevision: external-repo-URL -# externalPath: path -# externalValuesFiles: -# - values.yaml -# - extra-values-file.yaml -# deleteAppResourcesOnAppDeletion: false -# extraValuesFiles: -# - extra-values-file.yaml -# namespace: my-namespace -# autoSync: -# enabled: true -# selfHeal: true -# prune: true -# extraSyncOptions: -# - ServerSideApply=true \ No newline at end of file + # applications: + # - name: app-name + # enabled: true + # isExternalApp: true + # externalRepoURL: external-repo-URL + # externalTargetRevision: external-repo-URL + # externalPath: path + # externalValuesFiles: + # - values.yaml + # - extra-values-file.yaml + # parameters: + # - name: "example" + # value: "example" + # deleteAppResourcesOnAppDeletion: false + # extraValuesFiles: + # - extra-values-file.yaml + # namespace: my-namespace + # autoSync: + # enabled: true + # selfHeal: true + # prune: true + # extraSyncOptions: + # ServerSideApply: true \ No newline at end of file