Skip to content

Commit

Permalink
add CH_USER_ADMIN_PASSWORD env
Browse files Browse the repository at this point in the history
  • Loading branch information
kfeofantov committed Jun 6, 2018
1 parent ac10cb5 commit 2ada2f9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
12 changes: 7 additions & 5 deletions charts/user-manager/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,39 +32,34 @@ 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 }}"
{{- else }}
- name: CH_USER_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 }}"
{{- else }}
- name: CH_USER_PERMISSIONS_URL
value: "http://{{ .Release.Name }}-permissions:4242"
{{- end }}

{{- if .Values.env.local.CH_USER_AUTH_GRPC_ADDR }}
- name: CH_USER_AUTH_GRPC_ADDR
value: "{{ .Values.env.local.CH_USER_AUTH_GRPC_ADDR }}"
{{- else }}
- name: CH_USER_AUTH_GRPC_ADDR
value: "http://{{ .Release.Name }}-auth:1112"
{{- end }}

{{- if .Values.env.local.CH_USER_MAIL_URL }}
- name: CH_USER_MAIL_URL
value: "{{ .Values.env.local.CH_USER_MAIL_URL }}"
{{- else }}
- name: CH_USER_MAIL_URL
value: "http://{{ .Release.Name }}-mail:7070"
{{- end }}

{{- if .Values.env.local.CH_USER_PG_PASSWORD }}
- name: CH_USER_PG_PASSWORD
valueFrom:
Expand All @@ -78,3 +73,10 @@ spec:
name: {{ .Release.Name }}-postgresql
key: postgres-password
{{- end }}
{{- if .Values.env.local.CH_USER_ADMIN_PASSWORD }}
- name: CH_USER_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
key: admin-password
{{- end }}
5 changes: 4 additions & 1 deletion charts/user-manager/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.env.local.CH_USER_PG_PASSWORD }}
{{- if or .Values.env.local.CH_USER_PG_PASSWORD .Values.env.local.CH_USER_ADMIN_PASSWORD }}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -13,4 +13,7 @@ data:
{{- if .Values.env.local.CH_USER_PG_PASSWORD }}
pg-password: {{ .Values.env.local.CH_USER_PG_PASSWORD | b64enc }}
{{- end }}
{{- if .Values.env.local.CH_USER_ADMIN_PASSWORD }}
admin-password: {{ .Values.env.local.CH_USER_ADMIN_PASSWORD | b64enc }}
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions charts/user-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ env:
CH_USER_PERMISSIONS_URL: "http://permissions:4242"
CH_USER_AUTH_GRPC_ADDR: "auth:1112"
CH_USER_MAIL_URL: "mail-templater:7070"
CH_USER_ADMIN_PASSWORD:

postgresql:
persistence:
Expand Down

0 comments on commit 2ada2f9

Please sign in to comment.