Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"` | |
Expand All @@ -44,6 +45,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` | |
Expand Down
7 changes: 7 additions & 0 deletions templates/plumbing/argocd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ spec:
g, admin, role:admin
scopes: '[groups, email]'
repo:
env: {{ $.Values.clusterGroup.argoCD.env | toPrettyJson }}
initContainers:
- command:
- bash
Expand Down Expand Up @@ -85,6 +86,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
Expand Down Expand Up @@ -123,6 +127,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
Expand Down
6 changes: 6 additions & 0 deletions tests/argocd_cmp_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
20 changes: 20 additions & 0 deletions tests/argocd_env_test.yaml
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions tests/argocd_volumesMounts_test.yaml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,14 @@
"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"
},
"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",
Expand Down Expand Up @@ -718,6 +726,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"
Expand Down
2 changes: 2 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ clusterGroup:

argoCD:
initContainers: []
env: []
volumes: []
volumeMounts: []
configManagementPlugins: []
# resource tracking can be set to annotation, label, or annotation+label
resourceTrackingMethod: label
Expand Down