Skip to content

Commit

Permalink
feat(argo-cd): adds toggle for helm-working-dir (#2249)
Browse files Browse the repository at this point in the history
- Adds a toggle to be able to turn off the helm-working-dir for the
  repo server deployment. Using a shared helm repo storage directory can
  cause issues when multiple helm commands are being run in parallel.
  The repo server also has the ability to rebuild the repos and do
  updates in the normal flow for checking the status of an application
  so it won't cause issues if it's disabled.

Signed-off-by: Andrew Hamilton <[email protected]>
  • Loading branch information
ahamilton55 authored Sep 9, 2023
1 parent 34663ae commit eebb8c8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/argo-cd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: v2.8.3
kubeVersion: ">=1.23.0-0"
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: argo-cd
version: 5.45.5
version: 5.46.0
home: https://github.com/argoproj/argo-helm
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
sources:
Expand All @@ -27,4 +27,4 @@ annotations:
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
artifacthub.io/changes: |
- kind: added
description: Documented scheduling parameters for redis-ha
description: added a toggle for the shared Helm working directory
1 change: 1 addition & 0 deletions charts/argo-cd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ NAME: my-release
| repoServer.serviceAccount.name | string | `""` | Repo server service account name |
| repoServer.tolerations | list | `[]` (defaults to global.tolerations) | [Tolerations] for use with node taints |
| repoServer.topologySpreadConstraints | list | `[]` (defaults to global.topologySpreadConstraints) | Assign custom [TopologySpreadConstraints] rules to the repo server |
| repoServer.useEphemeralHelmWorkingDir | bool | `true` | Toggle the usage of a ephemeral Helm working directory |
| repoServer.volumeMounts | list | `[]` | Additional volumeMounts to the repo server main container |
| repoServer.volumes | list | `[]` | Additional volumes to the repo server pod |

Expand Down
6 changes: 6 additions & 0 deletions charts/argo-cd/templates/argocd-repo-server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,14 @@ spec:
key: reposerver.enable.git.submodule
name: argocd-cmd-params-cm
optional: true
{{- if .Values.repoServer.useEphemeralHelmWorkingDir }}
- name: HELM_CACHE_HOME
value: /helm-working-dir
- name: HELM_CONFIG_HOME
value: /helm-working-dir
- name: HELM_DATA_HOME
value: /helm-working-dir
{{- end }}
{{- with .Values.repoServer.envFrom }}
envFrom:
{{- toYaml . | nindent 10 }}
Expand All @@ -255,8 +257,10 @@ spec:
name: gpg-keyring
- mountPath: /app/config/reposerver/tls
name: argocd-repo-server-tls
{{- if .Values.repoServer.useEphemeralHelmWorkingDir }}
- mountPath: /helm-working-dir
name: helm-working-dir
{{- end }}
- mountPath: /home/argocd/cmp-server/plugins
name: plugins
- mountPath: /tmp
Expand Down Expand Up @@ -349,8 +353,10 @@ spec:
{{- with .Values.repoServer.volumes }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.repoServer.useEphemeralHelmWorkingDir }}
- name: helm-working-dir
emptyDir: {}
{{- end }}
- name: plugins
emptyDir: {}
- name: var-files
Expand Down
3 changes: 3 additions & 0 deletions charts/argo-cd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2177,6 +2177,9 @@ repoServer:
# - name: cmp-tmp
# emptyDir: {}

# -- Toggle the usage of a ephemeral Helm working directory
useEphemeralHelmWorkingDir: true

# -- Annotations to be added to repo server Deployment
deploymentAnnotations: {}

Expand Down

0 comments on commit eebb8c8

Please sign in to comment.