diff --git a/templates/gitops-agent/deployment.yaml b/templates/gitops-agent/deployment.yaml index 0471b84..2fb042b 100755 --- a/templates/gitops-agent/deployment.yaml +++ b/templates/gitops-agent/deployment.yaml @@ -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 }} diff --git a/values.yaml b/values.yaml index 4b52baf..9acb498 100644 --- a/values.yaml +++ b/values.yaml @@ -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: {}