|
@@ -103,6 +103,10 @@ spec:
|
|
|
fi
|
|
|
}
|
|
|
|
|
|
+ {{- if .Values.usePasswordFiles }}
|
|
|
+ export REDISCLI_AUTH="$(< $REDISCLI_AUTH_FILE)"
|
|
|
+ {{- end }}
|
|
|
+
|
|
|
info "Checking redis connection..."
|
|
|
if ! retry_while "check_redis_connection"; then
|
|
|
error "Could not connect to the Redis server"
|
|
@@ -112,11 +116,21 @@ spec:
|
|
|
fi
|
|
|
{{- if include "argocd.redis.auth.enabled" . }}
|
|
|
env:
|
|
|
+ {{- if .Values.usePasswordFiles }}
|
|
|
+ - name: REDISCLI_AUTH_FILE
|
|
|
+ value: {{ printf "/opt/bitnami/argo-cd/secrets/%s" (include "argocd.redis.secretPasswordKey" .) }}
|
|
|
+ {{- else }}
|
|
|
- name: REDISCLI_AUTH
|
|
|
valueFrom:
|
|
|
secretKeyRef:
|
|
|
name: {{ include "argocd.redis.secretName" . }}
|
|
|
key: {{ include "argocd.redis.secretPasswordKey" . }}
|
|
|
+ {{- end }}
|
|
|
+ {{- if .Values.usePasswordFiles }}
|
|
|
+ volumeMounts:
|
|
|
+ - name: argocd-secrets
|
|
|
+ mountPath: /opt/bitnami/argo-cd/secrets
|
|
|
+ {{- end }}
|
|
|
{{- end }}
|
|
|
{{- end }}
|
|
|
containers:
|
|
@@ -173,22 +187,17 @@ spec:
|
|
|
- name: ARGOCD_API_SERVER_REPLICAS
|
|
|
value: {{ .Values.server.replicaCount | quote }}
|
|
|
{{- end }}
|
|
|
- {{- if and .Values.redis.enabled (include "argocd.redis.auth.enabled" .) }}
|
|
|
+ {{- if (include "argocd.redis.auth.enabled" .) }}
|
|
|
+ {{- if .Values.usePasswordFiles }}
|
|
|
+ - name: REDISCLI_PASSWORD_FILE
|
|
|
+ value: {{ printf "/opt/bitnami/argo-cd/secrets/%s" (include "argocd.redis.secretPasswordKey" .) }}
|
|
|
+ {{- else }}
|
|
|
- name: REDIS_PASSWORD
|
|
|
valueFrom:
|
|
|
secretKeyRef:
|
|
|
name: {{ include "argocd.redis.secretName" . }}
|
|
|
key: {{ include "argocd.redis.secretPasswordKey" . }}
|
|
|
- {{- else if .Values.externalRedis.enabled }}
|
|
|
- - name: REDIS_PASSWORD
|
|
|
- {{- if not ( eq "" .Values.externalRedis.password ) }}
|
|
|
- value: {{ .Values.externalRedis.password }}
|
|
|
- {{- else }}
|
|
|
- valueFrom:
|
|
|
- secretKeyRef:
|
|
|
- name: {{ .Values.externalRedis.existingSecret }}
|
|
|
- key: {{ .Values.externalRedis.existingSecretPasswordKey }}
|
|
|
- {{- end }}
|
|
|
+ {{- end }}
|
|
|
{{- end }}
|
|
|
{{- if .Values.server.extraEnvVars }}
|
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.server.extraEnvVars "context" $) | nindent 12 }}
|
|
@@ -270,6 +279,10 @@ spec:
|
|
|
# Ref: https://argoproj.github.io/argo-cd/operator-manual/tls/#inbound-tls-certificates-used-by-argocd-repo-sever
|
|
|
- mountPath: /app/config/server/tls
|
|
|
name: argocd-repo-server-tls
|
|
|
+ {{- if and .Values.usePasswordFiles (include "argocd.redis.auth.enabled" .)}}
|
|
|
+ - name: argocd-secrets
|
|
|
+ mountPath: /opt/bitnami/argo-cd/secrets
|
|
|
+ {{- end }}
|
|
|
{{- if .Values.server.extraVolumeMounts }}
|
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.server.extraVolumeMounts "context" $) | nindent 12 }}
|
|
|
{{- end }}
|
|
@@ -282,6 +295,13 @@ spec:
|
|
|
- name: ssh-known-hosts
|
|
|
configMap:
|
|
|
name: argocd-ssh-known-hosts-cm
|
|
|
+ {{- if and .Values.usePasswordFiles (include "argocd.redis.auth.enabled" .)}}
|
|
|
+ - name: argocd-secrets
|
|
|
+ projected:
|
|
|
+ sources:
|
|
|
+ - secret:
|
|
|
+ name: {{ include "argocd.redis.secretName" . }}
|
|
|
+ {{- end }}
|
|
|
{{- if .Values.config.styles }}
|
|
|
- configMap:
|
|
|
name: {{ include "argocd.custom-styles.fullname" . }}
|