diff --git a/stable/xray/templates/xray-statefulset.yaml b/stable/xray/templates/xray-statefulset.yaml index 0e0914b8a..47170798b 100644 --- a/stable/xray/templates/xray-statefulset.yaml +++ b/stable/xray/templates/xray-statefulset.yaml @@ -923,117 +923,117 @@ spec: {{- end }} env: {{- if and .Values.rabbitmq.external.secrets (not .Values.common.rabbitmq.connectionConfigFromEnvironment) }} - - name: JF_SHARED_RABBITMQ_USERNAME - valueFrom: - secretKeyRef: - name: {{ tpl .Values.rabbitmq.external.secrets.username.name . }} - key: {{ tpl .Values.rabbitmq.external.secrets.username.key . }} - - name: JF_SHARED_RABBITMQ_PASSWORD - valueFrom: - secretKeyRef: - name: {{ tpl .Values.rabbitmq.external.secrets.password.name . }} - key: {{ tpl .Values.rabbitmq.external.secrets.password.key . }} - - name: JF_SHARED_RABBITMQ_URL - valueFrom: - secretKeyRef: - name: {{ tpl .Values.rabbitmq.external.secrets.url.name . }} - key: {{ tpl .Values.rabbitmq.external.secrets.url.key . }} + - name: JF_SHARED_RABBITMQ_USERNAME + valueFrom: + secretKeyRef: + name: {{ tpl .Values.rabbitmq.external.secrets.username.name . }} + key: {{ tpl .Values.rabbitmq.external.secrets.username.key . }} + - name: JF_SHARED_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + name: {{ tpl .Values.rabbitmq.external.secrets.password.name . }} + key: {{ tpl .Values.rabbitmq.external.secrets.password.key . }} + - name: JF_SHARED_RABBITMQ_URL + valueFrom: + secretKeyRef: + name: {{ tpl .Values.rabbitmq.external.secrets.url.name . }} + key: {{ tpl .Values.rabbitmq.external.secrets.url.key . }} {{- end }} {{- if or .Values.database.secrets.user .Values.database.user }} - - name: JF_SHARED_DATABASE_USERNAME - valueFrom: - secretKeyRef: + - name: JF_SHARED_DATABASE_USERNAME + valueFrom: + secretKeyRef: {{- if .Values.database.secrets.user }} - name: {{ tpl .Values.database.secrets.user.name . }} - key: {{ tpl .Values.database.secrets.user.key . }} + name: {{ tpl .Values.database.secrets.user.name . }} + key: {{ tpl .Values.database.secrets.user.key . }} {{- else if .Values.database.user }} - {{- if not .Values.xray.unifiedSecretInstallation }} - name: {{ template "xray.fullname" . }}-database-creds - {{- else }} - name: "{{ template "xray.name" . }}-unified-secret" - {{- end }} - key: db-user + {{- if not .Values.xray.unifiedSecretInstallation }} + name: {{ template "xray.fullname" . }}-database-creds + {{- else }} + name: "{{ template "xray.name" . }}-unified-secret" + {{- end }} + key: db-user {{- end }} {{- end }} {{- if or .Values.database.secrets.actualUsername .Values.database.actualUsername }} - - name: JF_SHARED_DATABASE_ACTUALUSERNAME - valueFrom: - secretKeyRef: + - name: JF_SHARED_DATABASE_ACTUALUSERNAME + valueFrom: + secretKeyRef: {{- if .Values.database.secrets.actualUsername }} - name: {{ tpl .Values.database.secrets.actualUsername.name . }} - key: {{ tpl .Values.database.secrets.actualUsername.key . }} + name: {{ tpl .Values.database.secrets.actualUsername.name . }} + key: {{ tpl .Values.database.secrets.actualUsername.key . }} {{- else if .Values.database.actualUsername }} - {{- if not .Values.xray.unifiedSecretInstallation }} - name: {{ template "xray.fullname" . }}-database-creds - {{- else }} - name: "{{ template "xray.name" . }}-unified-secret" - {{- end }} - key: db-actualUsername + {{- if not .Values.xray.unifiedSecretInstallation }} + name: {{ template "xray.fullname" . }}-database-creds + {{- else }} + name: "{{ template "xray.name" . }}-unified-secret" + {{- end }} + key: db-actualUsername {{- end }} {{- end }} {{ if or .Values.database.secrets.password .Values.database.password .Values.postgresql.enabled }} - - name: JF_SHARED_DATABASE_PASSWORD - valueFrom: - secretKeyRef: + - name: JF_SHARED_DATABASE_PASSWORD + valueFrom: + secretKeyRef: {{- if .Values.database.secrets.password }} - name: {{ tpl .Values.database.secrets.password.name . }} - key: {{ tpl .Values.database.secrets.password.key . }} + name: {{ tpl .Values.database.secrets.password.name . }} + key: {{ tpl .Values.database.secrets.password.key . }} {{- else if .Values.database.password }} - {{- if not .Values.xray.unifiedSecretInstallation }} - name: {{ template "xray.fullname" . }}-database-creds - {{- else }} - name: "{{ template "xray.name" . }}-unified-secret" - {{- end }} - key: db-password + {{- if not .Values.xray.unifiedSecretInstallation }} + name: {{ template "xray.fullname" . }}-database-creds + {{- else }} + name: "{{ template "xray.name" . }}-unified-secret" + {{- end }} + key: db-password {{- else if .Values.postgresql.enabled }} - name: {{ .Release.Name }}-postgresql - key: postgresql-password + name: {{ .Release.Name }}-postgresql + key: postgresql-password {{- end }} {{- end }} {{- if or .Values.database.secrets.url .Values.database.url }} - - name: JF_SHARED_DATABASE_URL - valueFrom: - secretKeyRef: + - name: JF_SHARED_DATABASE_URL + valueFrom: + secretKeyRef: {{- if .Values.database.secrets.url }} - name: {{ tpl .Values.database.secrets.url.name . }} - key: {{ tpl .Values.database.secrets.url.key . }} + name: {{ tpl .Values.database.secrets.url.name . }} + key: {{ tpl .Values.database.secrets.url.key . }} {{- else if .Values.database.url }} {{- if not .Values.xray.unifiedSecretInstallation }} - name: {{ template "xray.fullname" . }}-database-creds + name: {{ template "xray.fullname" . }}-database-creds {{- else }} - name: "{{ template "xray.name" . }}-unified-secret" + name: "{{ template "xray.name" . }}-unified-secret" {{- end }} - key: db-url + key: db-url {{- end }} {{- end }} {{- if .Values.common.rabbitmq.connectionConfigFromEnvironment }} - - name: JF_SHARED_RABBITMQ_USERNAME - value: {{ include "rabbitmq.user" .}} - - name: JF_SHARED_RABBITMQ_URL - value: {{ include "rabbitmq.url" .}} - - name: JF_SHARED_RABBITMQ_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "rabbitmq.passwordSecretName" .}} - key: rabbitmq-password + - name: JF_SHARED_RABBITMQ_USERNAME + value: {{ include "rabbitmq.user" .}} + - name: JF_SHARED_RABBITMQ_URL + value: {{ include "rabbitmq.url" .}} + - name: JF_SHARED_RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "rabbitmq.passwordSecretName" .}} + key: rabbitmq-password {{- end }} - - name: XRAY_HA_NODE_ID - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: XRAY_K8S_ENV - value: "true" - - name: EXECUTION_JOB_AES_KEY - valueFrom: - secretKeyRef: - {{- if not .Values.xray.unifiedSecretInstallation }} - name: {{ template "xray.executionServiceAesKeySecretName" . }} - {{- else if and .Values.xray.unifiedSecretInstallation (or .Values.xray.executionServiceAesKeySecretName .Values.global.executionServiceAesKeySecretName) }} - name: {{ template "xray.executionServiceAesKeySecretName" . }} - {{- else }} - name: "{{ template "xray.name" . }}-unified-secret" - {{- end }} - key: execution-service-aes-key + - name: XRAY_HA_NODE_ID + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: XRAY_K8S_ENV + value: "true" + - name: EXECUTION_JOB_AES_KEY + valueFrom: + secretKeyRef: + {{- if not .Values.xray.unifiedSecretInstallation }} + name: {{ template "xray.executionServiceAesKeySecretName" . }} + {{- else if and .Values.xray.unifiedSecretInstallation (or .Values.xray.executionServiceAesKeySecretName .Values.global.executionServiceAesKeySecretName) }} + name: {{ template "xray.executionServiceAesKeySecretName" . }} + {{- else }} + name: "{{ template "xray.name" . }}-unified-secret" + {{- end }} + key: execution-service-aes-key {{- if .Values.common.extraEnvVars }} {{- tpl .Values.common.extraEnvVars . | nindent 8 }} {{- end }}