From 48629e6ec7c85c13ede0a86b272ac2bbecf0afc6 Mon Sep 17 00:00:00 2001 From: Giulio Cardillo Date: Sun, 15 Feb 2026 20:40:29 +0100 Subject: [PATCH 1/3] Add support to CMP sidecars envs --- templates/plumbing/argocd.yaml | 3 +++ tests/argocd_cmp_test.yaml | 6 ++++++ values.schema.json | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/templates/plumbing/argocd.yaml b/templates/plumbing/argocd.yaml index 0513c0d..8e1fddb 100644 --- a/templates/plumbing/argocd.yaml +++ b/templates/plumbing/argocd.yaml @@ -123,6 +123,9 @@ spec: imagePullPolicy: {{ coalesce $cmp.imagePullPolicy "Always" }} securityContext: runAsNonRoot: true +{{- if $cmp.env }} + env: {{ $cmp.env | toPrettyJson }} +{{- end }} volumeMounts: - mountPath: /var/run/argocd name: var-files diff --git a/tests/argocd_cmp_test.yaml b/tests/argocd_cmp_test.yaml index 657aae2..f7efa90 100644 --- a/tests/argocd_cmp_test.yaml +++ b/tests/argocd_cmp_test.yaml @@ -13,6 +13,9 @@ tests: image: test-cmp-img pluginConfig: | test-cmp-config + env: + - name: env-name + value: env-value volumeMounts: - mountPath: /test name: test-cmp-volumemount @@ -38,6 +41,9 @@ tests: imagePullPolicy: Always securityContext: runAsNonRoot: true + env: + - name: env-name + value: env-value volumeMounts: - mountPath: /var/run/argocd name: var-files diff --git a/values.schema.json b/values.schema.json index d95470e..03dcd3b 100644 --- a/values.schema.json +++ b/values.schema.json @@ -718,6 +718,10 @@ "type": "string", "description": "Image pull policy for the sidecar. Defaults to 'Always'" }, + "env": { + "type": "array", + "description": "Environment variables for the sidecar" + }, "volumeMounts": { "type": "array", "description": "Additional volumeMounts for the sidecar" From 5db3247fe80e9a901e726f941c4c601eba8de197 Mon Sep 17 00:00:00 2001 From: Giulio Cardillo Date: Sun, 15 Feb 2026 20:49:38 +0100 Subject: [PATCH 2/3] Add support to repo volumeMounts --- README.md | 1 + templates/plumbing/argocd.yaml | 3 +++ tests/argocd_volumesMounts_test.yaml | 20 ++++++++++++++++++++ values.schema.json | 4 ++++ values.yaml | 1 + 5 files changed, 29 insertions(+) create mode 100644 tests/argocd_volumesMounts_test.yaml diff --git a/README.md b/README.md index 0d811f7..2b82408 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ This chart is used to set up the basic building blocks in [Validated Patterns](h | clusterGroup.argoCD.resourceHealthChecks[1].group | string | `"serving.kserve.io"` | | | clusterGroup.argoCD.resourceHealthChecks[1].kind | string | `"InferenceService"` | | | clusterGroup.argoCD.resourceTrackingMethod | string | `"label"` | | +| clusterGroup.argoCD.volumeMounts | list | `[]` | | | clusterGroup.argoCD.volumes | list | `[]` | | | clusterGroup.extraObjects | object | `{}` | | | clusterGroup.imperative.activeDeadlineSeconds | int | `3600` | | diff --git a/templates/plumbing/argocd.yaml b/templates/plumbing/argocd.yaml index 8e1fddb..f42cc2c 100644 --- a/templates/plumbing/argocd.yaml +++ b/templates/plumbing/argocd.yaml @@ -85,6 +85,9 @@ spec: volumeMounts: - mountPath: /etc/pki/tls/certs name: ca-bundles +{{- if len $.Values.clusterGroup.argoCD.volumeMounts }} +{{ toYaml $.Values.clusterGroup.argoCD.volumeMounts | indent 4 }} +{{- end }} volumes: - configMap: name: kube-root-ca.crt diff --git a/tests/argocd_volumesMounts_test.yaml b/tests/argocd_volumesMounts_test.yaml new file mode 100644 index 0000000..1cd418d --- /dev/null +++ b/tests/argocd_volumesMounts_test.yaml @@ -0,0 +1,20 @@ +suite: Test argocd with volumeMounts +templates: + - templates/plumbing/argocd.yaml +release: + name: release-test +tests: + - it: should render the additional custom volumeMounts correctly + set: + clusterGroup: + argoCD: + volumeMounts: + - name: test-volume + mountPath: /test + documentIndex: 0 + asserts: + - contains: + path: spec.repo.volumeMounts + content: + name: test-volume + mountPath: /test diff --git a/values.schema.json b/values.schema.json index 03dcd3b..cec13e4 100644 --- a/values.schema.json +++ b/values.schema.json @@ -680,6 +680,10 @@ "type": "array", "description": "A list of volumes to add to the repo-server if needed" }, + "volumeMounts": { + "type": "array", + "description": "A list of volumeMounts to add to the repo-server if needed" + }, "resourceTrackingMethod": { "type": "string", "description": "ResourceTrackingMethod defines how Argo CD should track resources that it manages", diff --git a/values.yaml b/values.yaml index 447ff13..d50085e 100644 --- a/values.yaml +++ b/values.yaml @@ -31,6 +31,7 @@ clusterGroup: argoCD: initContainers: [] volumes: [] + volumeMounts: [] configManagementPlugins: [] # resource tracking can be set to annotation, label, or annotation+label resourceTrackingMethod: label From a16d06de2e7a79a9100e770b2869c2df7e73952a Mon Sep 17 00:00:00 2001 From: Giulio Cardillo Date: Sun, 15 Feb 2026 20:49:53 +0100 Subject: [PATCH 3/3] Add support to repo env --- README.md | 1 + templates/plumbing/argocd.yaml | 1 + tests/argocd_env_test.yaml | 20 ++++++++++++++++++++ values.schema.json | 4 ++++ values.yaml | 1 + 5 files changed, 27 insertions(+) create mode 100644 tests/argocd_env_test.yaml diff --git a/README.md b/README.md index 2b82408..e6970b8 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ This chart is used to set up the basic building blocks in [Validated Patterns](h |-----|------|---------|-------------| | clusterGroup.applications | object | `{}` | | | clusterGroup.argoCD.configManagementPlugins | list | `[]` | | +| clusterGroup.argoCD.env | list | `[]` | | | clusterGroup.argoCD.initContainers | list | `[]` | | | clusterGroup.argoCD.resourceExclusions | string | `"- apiGroups:\n - tekton.dev\n kinds:\n - TaskRun\n - PipelineRun\n"` | | | clusterGroup.argoCD.resourceHealthChecks[0].check | string | `"hs = {}\nif obj.status ~= nil then\n if obj.status.phase ~= nil then\n if obj.status.phase == \"Pending\" then\n hs.status = \"Healthy\"\n hs.message = obj.status.phase\n return hs\n elseif obj.status.phase == \"Bound\" then\n hs.status = \"Healthy\"\n hs.message = obj.status.phase\n return hs\n end\n end\nend\nhs.status = \"Progressing\"\nhs.message = \"Waiting for PVC\"\nreturn hs\n"` | | diff --git a/templates/plumbing/argocd.yaml b/templates/plumbing/argocd.yaml index f42cc2c..2832806 100644 --- a/templates/plumbing/argocd.yaml +++ b/templates/plumbing/argocd.yaml @@ -55,6 +55,7 @@ spec: g, admin, role:admin scopes: '[groups, email]' repo: + env: {{ $.Values.clusterGroup.argoCD.env | toPrettyJson }} initContainers: - command: - bash diff --git a/tests/argocd_env_test.yaml b/tests/argocd_env_test.yaml new file mode 100644 index 0000000..594b809 --- /dev/null +++ b/tests/argocd_env_test.yaml @@ -0,0 +1,20 @@ +suite: Test argocd with env +templates: + - templates/plumbing/argocd.yaml +release: + name: release-test +tests: + - it: should render the env correctly + set: + clusterGroup: + argoCD: + env: + - name: env-name + value: env-value + documentIndex: 0 + asserts: + - contains: + path: spec.repo.env + content: + name: env-name + value: env-value diff --git a/values.schema.json b/values.schema.json index cec13e4..3e5983a 100644 --- a/values.schema.json +++ b/values.schema.json @@ -684,6 +684,10 @@ "type": "array", "description": "A list of volumeMounts to add to the repo-server if needed" }, + "env": { + "type": "array", + "description": "A list of environment variables to add to the repo-server if needed" + }, "resourceTrackingMethod": { "type": "string", "description": "ResourceTrackingMethod defines how Argo CD should track resources that it manages", diff --git a/values.yaml b/values.yaml index d50085e..a59b2c0 100644 --- a/values.yaml +++ b/values.yaml @@ -30,6 +30,7 @@ clusterGroup: argoCD: initContainers: [] + env: [] volumes: [] volumeMounts: [] configManagementPlugins: []