From 603fb4f85e5df05108ee6f264e8b75f6856a31ad Mon Sep 17 00:00:00 2001 From: Margarita Date: Mon, 15 Oct 2018 10:48:08 +0300 Subject: [PATCH] fix-envs-in-charts-templates --- charts/user-manager/templates/deployment.yaml | 42 +++++++++---------- charts/user-manager/templates/secret.yaml | 10 ++--- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/charts/user-manager/templates/deployment.yaml b/charts/user-manager/templates/deployment.yaml index 807bcf30..3b6dca87 100644 --- a/charts/user-manager/templates/deployment.yaml +++ b/charts/user-manager/templates/deployment.yaml @@ -32,49 +32,49 @@ spec: - name: {{ $key }} value: {{ $val | quote }} {{- end }} - {{- if .Values.env.local.CH_USER_PG_ADDR }} - - name: CH_USER_PG_ADDR - value: "{{ .Values.env.local.CH_USER_PG_ADDR }}" + {{- if .Values.env.local.PG_ADDR }} + - name: PG_ADDR + value: "{{ .Values.env.local.PG_ADDR }}" {{- else }} - - name: CH_USER_PG_ADDR + - name: PG_ADDR value: "{{ .Release.Name }}-postgresql:5432" {{- end }} - {{- if .Values.env.local.CH_USER_PERMISSIONS_URL }} - - name: CH_USER_PERMISSIONS_URL - value: "{{ .Values.env.local.CH_USER_PERMISSIONS_URL }}" + {{- if .Values.env.local.PERMISSIONS_URL }} + - name: PERMISSIONS_URL + value: "{{ .Values.env.local.PERMISSIONS_URL }}" {{- else }} - - name: CH_USER_PERMISSIONS_URL + - name: PERMISSIONS_URL value: "http://{{ .Release.Name }}-permissions:4242" {{- end }} - {{- if .Values.env.local.CH_USER_AUTH_HTTP_ADDR }} - - name: CH_USER_AUTH_HTTP_ADDR - value: "{{ .Values.env.local.CH_USER_AUTH_HTTP_ADDR }}" + {{- if .Values.env.local.AUTH_URL }} + - name: AUTH_URL + value: "{{ .Values.env.local.AUTH_URL }}" {{- else }} - - name: CH_USER_AUTH_HTTP_ADDR + - name: AUTH_URL value: "http://{{ .Release.Name }}-auth:1111" {{- end }} - {{- if .Values.env.local.CH_USER_MAIL_URL }} - - name: CH_USER_MAIL_URL - value: "{{ .Values.env.local.CH_USER_MAIL_URL }}" + {{- if .Values.env.local.MAIL_URL }} + - name: MAIL_URL + value: "{{ .Values.env.local.MAIL_URL }}" {{- else }} - - name: CH_USER_MAIL_URL + - name: MAIL_URL value: "http://{{ .Release.Name }}-mail:7070" {{- end }} - {{- if .Values.env.local.CH_USER_PG_PASSWORD }} - - name: CH_USER_PG_PASSWORD + {{- if .Values.env.local.PG_PASSWORD }} + - name: PG_PASSWORD valueFrom: secretKeyRef: name: {{ template "fullname" . }} key: pg-password {{- else if .Values.tags.platformdb }} - - name: CH_USER_PG_PASSWORD + - name: PG_PASSWORD valueFrom: secretKeyRef: name: {{ .Release.Name }}-postgresql key: postgres-password {{- end }} - {{- if .Values.env.local.CH_USER_ADMIN_PASSWORD }} - - name: CH_USER_ADMIN_PASSWORD + {{- if .Values.env.local.ADMIN_PASSWORD }} + - name: ADMIN_PASSWORD valueFrom: secretKeyRef: name: {{ template "fullname" . }} diff --git a/charts/user-manager/templates/secret.yaml b/charts/user-manager/templates/secret.yaml index 66844ea9..a7d1d34b 100644 --- a/charts/user-manager/templates/secret.yaml +++ b/charts/user-manager/templates/secret.yaml @@ -1,4 +1,4 @@ -{{- if or .Values.env.local.CH_USER_PG_PASSWORD .Values.env.local.CH_USER_ADMIN_PASSWORD }} +{{- if or .Values.env.local.PG_PASSWORD .Values.env.local.ADMIN_PASSWORD }} apiVersion: v1 kind: Secret metadata: @@ -10,10 +10,10 @@ metadata: heritage: {{ .Release.Service }} type: Opaque data: - {{- if .Values.env.local.CH_USER_PG_PASSWORD }} - pg-password: {{ .Values.env.local.CH_USER_PG_PASSWORD | b64enc }} + {{- if .Values.env.local.PG_PASSWORD }} + pg-password: {{ .Values.env.local.PG_PASSWORD | b64enc }} {{- end }} - {{- if .Values.env.local.CH_USER_ADMIN_PASSWORD }} - admin-password: {{ .Values.env.local.CH_USER_ADMIN_PASSWORD | b64enc }} + {{- if .Values.env.local.ADMIN_PASSWORD }} + admin-password: {{ .Values.env.local.ADMIN_PASSWORD | b64enc }} {{- end }} {{- end }}