Skip to content

Commit

Permalink
feat(argo-cd): Add optional mapping of argocd-repo-server emptydir to…
Browse files Browse the repository at this point in the history
… custom volumes (#2410)

* Add optional volumes to replace emptydir

Provide user-driven option to replace emptydir volumes with desired solution

Signed-off-by: Michele Sacchetti <[email protected]>

* existingVolumes default values

provide default values with empy object to ensure default behavior is backward-compatible

Signed-off-by: Michele Sacchetti <[email protected]>

* Update Chart.yaml

bump version

Signed-off-by: Michele Sacchetti <[email protected]>

* Update Chart.yaml

add changelog

Signed-off-by: Michele Sacchetti <[email protected]>

* fix docs

fix docs on new entry

Signed-off-by: Michele Sacchetti <[email protected]>

* fix readme

Signed-off-by: Michele Sacchetti <[email protected]>

* Update README.md.gotmpl

Signoff commit

Signed-off-by: Michele Sacchetti <[email protected]>

* fix readme

Signed-off-by: Michele Sacchetti <[email protected]>

* fixCamelCase
Signed-off-by: Michele Sacchetti <[email protected]>

---------

Signed-off-by: Michele Sacchetti <[email protected]>
  • Loading branch information
aroundthecode authored Jan 18, 2024
1 parent e37093f commit 508162f
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 3 deletions.
6 changes: 3 additions & 3 deletions charts/argo-cd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: v2.9.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.52.2
version: 5.53.0
home: https://github.com/argoproj/argo-helm
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
sources:
Expand All @@ -26,5 +26,5 @@ annotations:
fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
artifacthub.io/changes: |
- kind: fixed
description: Missing colon for policy.csv block
- kind: added
description: Optionally map argocd-repo-server emptydir volumes on custom volumes
5 changes: 5 additions & 0 deletions charts/argo-cd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ For full list of changes please check ArtifactHub [changelog].

Highlighted versions provide information about additional steps that should be performed by user when upgrading to newer version.

### 5.53.0

Argocd-repo-server can now optionally use Persistent Volumes for its mountpoints instead of only emptydir()

### 5.52.0
Because [Argo CD Extensions] is now deprecated and no further changes will be made, we switched to [Argo CD Extension Installer], adding an Argo CD Extension Installer to init-container in the Argo CD API server.
If you used old mechanism, please move to new mechanism. For more details, please refer `.Values.server.extensions` in values.yaml.
Expand Down Expand Up @@ -609,6 +613,7 @@ NAME: my-release
| repoServer.dnsPolicy | string | `"ClusterFirst"` | Alternative DNS policy for Repo server pods |
| repoServer.env | list | `[]` | Environment variables to pass to repo server |
| repoServer.envFrom | list | `[]` (See [values.yaml]) | envFrom to pass to repo server |
| repoServer.existingVolumes | object | `{}` | Volumes to be used in replacement of emptydir on default volumes |
| repoServer.extraArgs | list | `[]` | Additional command line arguments to pass to repo server |
| repoServer.extraContainers | list | `[]` | Additional containers to be added to the repo server pod |
| repoServer.hostNetwork | bool | `false` | Host Network for Repo server pods |
Expand Down
4 changes: 4 additions & 0 deletions charts/argo-cd/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ For full list of changes please check ArtifactHub [changelog].

Highlighted versions provide information about additional steps that should be performed by user when upgrading to newer version.

### 5.53.0

Argocd-repo-server can now optionally use Persistent Volumes for its mountpoints instead of only emptydir()

### 5.52.0
Because [Argo CD Extensions] is now deprecated and no further changes will be made, we switched to [Argo CD Extension Installer], adding an Argo CD Extension Installer to init-container in the Argo CD API server.
If you used old mechanism, please move to new mechanism. For more details, please refer `.Values.server.extensions` in values.yaml.
Expand Down
20 changes: 20 additions & 0 deletions charts/argo-cd/templates/argocd-repo-server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -373,14 +373,30 @@ spec:
{{- end }}
{{- if .Values.repoServer.useEphemeralHelmWorkingDir }}
- name: helm-working-dir
{{- if .Values.repoServer.existingVolumes.helmWorkingDir -}}
{{ toYaml .Values.repoServer.existingVolumes.helmWorkingDir | nindent 8 }}
{{- else }}
emptyDir: {}
{{- end }}
{{- end }}
- name: plugins
{{- if .Values.repoServer.existingVolumes.plugins -}}
{{ toYaml .Values.repoServer.existingVolumes.plugins | nindent 8 }}
{{- else }}
emptyDir: {}
{{- end }}
- name: var-files
{{- if .Values.repoServer.existingVolumes.varFiles -}}
{{ toYaml .Values.repoServer.existingVolumes.varFiles | nindent 8 }}
{{- else }}
emptyDir: {}
{{- end }}
- name: tmp
{{- if .Values.repoServer.existingVolumes.tmp -}}
{{ toYaml .Values.repoServer.existingVolumes.tmp | nindent 8 }}
{{- else }}
emptyDir: {}
{{- end }}
- name: ssh-known-hosts
configMap:
name: argocd-ssh-known-hosts-cm
Expand All @@ -391,7 +407,11 @@ spec:
configMap:
name: argocd-gpg-keys-cm
- name: gpg-keyring
{{- if .Values.repoServer.existingVolumes.gpgKeyring -}}
{{ toYaml .Values.repoServer.existingVolumes.gpgKeyring | nindent 8 }}
{{- else }}
emptyDir: {}
{{- end }}
- name: argocd-repo-server-tls
secret:
secretName: argocd-repo-server-tls
Expand Down
18 changes: 18 additions & 0 deletions charts/argo-cd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2217,6 +2217,24 @@ repoServer:
# - name: cmp-tmp
# emptyDir: {}

# -- Volumes to be used in replacement of emptydir on default volumes
existingVolumes: {}
# gpgKeyring:
# persistentVolumeClaim:
# claimName: pvc-argocd-repo-server-keyring
# helmWorkingDir:
# persistentVolumeClaim:
# claimName: pvc-argocd-repo-server-workdir
# tmp:
# persistentVolumeClaim:
# claimName: pvc-argocd-repo-server-tmp
# varFiles:
# persistentVolumeClaim:
# claimName: pvc-argocd-repo-server-varfiles
# plugins:
# persistentVolumeClaim:
# claimName: pvc-argocd-repo-server-plugins

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

Expand Down

0 comments on commit 508162f

Please sign in to comment.