Skip to content

Commit 33933f0

Browse files
committed
Add support to repo env
1 parent e5d3684 commit 33933f0

4 files changed

Lines changed: 26 additions & 0 deletions

File tree

templates/plumbing/argocd.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ spec:
5555
g, admin, role:admin
5656
scopes: '[groups, email]'
5757
repo:
58+
env: {{ $.Values.clusterGroup.argoCD.env | toPrettyJson }}
5859
initContainers:
5960
- command:
6061
- bash

tests/argocd_env_test.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
suite: Test argocd with env
2+
templates:
3+
- templates/plumbing/argocd.yaml
4+
release:
5+
name: release-test
6+
tests:
7+
- it: should render the env correctly
8+
set:
9+
clusterGroup:
10+
argoCD:
11+
env:
12+
- name: env-name
13+
value: env-value
14+
documentIndex: 0
15+
asserts:
16+
- contains:
17+
path: spec.repo.env
18+
content:
19+
name: env-name
20+
value: env-value

values.schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,10 @@
684684
"type": "array",
685685
"description": "A list of volumeMounts to add to the repo-server if needed"
686686
},
687+
"env": {
688+
"type": "array",
689+
"description": "A list of environment variables to add to the repo-server if needed"
690+
},
687691
"resourceTrackingMethod": {
688692
"type": "string",
689693
"description": "ResourceTrackingMethod defines how Argo CD should track resources that it manages",

values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ clusterGroup:
3030

3131
argoCD:
3232
initContainers: []
33+
env: []
3334
volumes: []
3435
volumeMounts: []
3536
configManagementPlugins: []

0 commit comments

Comments
 (0)