Skip to content

Commit

Permalink
feat: [CDS-97420]: add reference to argocd redis secret (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashinsabu3 authored Jul 4, 2024
1 parent d1a47f9 commit 62ddc3d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
29 changes: 29 additions & 0 deletions templates/gitops-agent/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,35 @@ spec:
name: {{ .Values.agent.name }}
- secretRef:
name: {{ .Values.agent.name }}
env:
- name: REDIS_USERNAME
valueFrom:
secretKeyRef:
name: {{ default "argocd-redis" .Values.externalRedis.existingSecret }}
key: redis-username
optional: true
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ default "argocd-redis" .Values.externalRedis.existingSecret }}
{{- if .Values.externalRedis.host }}
key: redis-password
optional: true
{{- else }}
key: auth
{{- end }}
- name: REDIS_SENTINEL_USERNAME
valueFrom:
secretKeyRef:
name: {{ default (include "argo-cd.redis.fullname" .) .Values.externalRedis.existingSecret }}
key: redis-sentinel-username
optional: true
- name: REDIS_SENTINEL_PASSWORD
valueFrom:
secretKeyRef:
name: {{ default (include "argo-cd.redis.fullname" .) .Values.externalRedis.existingSecret }}
key: redis-sentinel-password
optional: true
volumeMounts:
{{- with .Values.agent.volumeMounts }}
{{- toYaml . | nindent 8 }}
Expand Down
16 changes: 16 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -553,3 +553,19 @@ controller:

redis:
name: redis

# External Redis parameters
externalRedis:
# -- External Redis server host
host: ""
# -- External Redis username
username: ""
# -- External Redis password
password: ""
# -- External Redis server port
port: 6379
# -- The name of an existing secret with Redis (must contain key `redis-password`) and Sentinel credentials.
# When it's set, the `externalRedis.password` parameter is ignored
existingSecret: ""
# -- External Redis Secret annotations
secretAnnotations: {}

0 comments on commit 62ddc3d

Please sign in to comment.