feat(argo-cd): Add affinity to redisSecretInit Job (#2962)

feat: Add affinity to redisSecretInit Job

Signed-off-by: killianmuldoon <kmuldoon@nvidia.com>
This commit is contained in:
killianmuldoon 2024-10-03 14:53:05 +01:00 committed by GitHub
parent d61432be3c
commit bbb38b310d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 3 deletions

View file

@ -3,7 +3,7 @@ appVersion: v2.12.4
kubeVersion: ">=1.25.0-0" kubeVersion: ">=1.25.0-0"
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: argo-cd name: argo-cd
version: 7.6.7 version: 7.6.8
home: https://github.com/argoproj/argo-helm home: https://github.com/argoproj/argo-helm
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
sources: sources:
@ -26,5 +26,5 @@ annotations:
fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252 fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252
url: https://argoproj.github.io/argo-helm/pgp_keys.asc url: https://argoproj.github.io/argo-helm/pgp_keys.asc
artifacthub.io/changes: | artifacthub.io/changes: |
- kind: fixed - kind: added
description: Arrange for ApplicationSet in any namespace. description: Set affinity in redis secret-init job.

View file

@ -1394,6 +1394,7 @@ If you use an External Redis (See Option 3 above), this Job is not deployed.
| Key | Type | Default | Description | | Key | Type | Default | Description |
|-----|------|---------|-------------| |-----|------|---------|-------------|
| redisSecretInit.affinity | object | `{}` | Assign custom [affinity] rules to the Redis secret-init Job |
| redisSecretInit.containerSecurityContext | object | See [values.yaml] | Application controller container-level security context | | redisSecretInit.containerSecurityContext | object | See [values.yaml] | Application controller container-level security context |
| redisSecretInit.enabled | bool | `true` | Enable Redis secret initialization. If disabled, secret must be provisioned by alternative methods | | redisSecretInit.enabled | bool | `true` | Enable Redis secret initialization. If disabled, secret must be provisioned by alternative methods |
| redisSecretInit.image.imagePullPolicy | string | `""` (defaults to global.image.imagePullPolicy) | Image pull policy for the Redis secret-init Job | | redisSecretInit.image.imagePullPolicy | string | `""` (defaults to global.image.imagePullPolicy) | Image pull policy for the Redis secret-init Job |

View file

@ -54,6 +54,10 @@ spec:
priorityClassName: {{ . }} priorityClassName: {{ . }}
{{- end }} {{- end }}
restartPolicy: OnFailure restartPolicy: OnFailure
{{- with include "argo-cd.affinity" (dict "context" . "component" .Values.redisSecretInit) }}
affinity:
{{- trim . | nindent 8 }}
{{- end }}
{{- with .Values.redisSecretInit.nodeSelector | default .Values.global.nodeSelector }} {{- with .Values.redisSecretInit.nodeSelector | default .Values.global.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}

View file

@ -1725,6 +1725,9 @@ redisSecretInit:
# @default -- `""` (defaults to global.priorityClassName) # @default -- `""` (defaults to global.priorityClassName)
priorityClassName: "" priorityClassName: ""
# -- Assign custom [affinity] rules to the Redis secret-init Job
affinity: {}
# -- Node selector to be added to the Redis secret-init Job # -- Node selector to be added to the Redis secret-init Job
# @default -- `{}` (defaults to global.nodeSelector) # @default -- `{}` (defaults to global.nodeSelector)
nodeSelector: {} nodeSelector: {}