File tree Expand file tree Collapse file tree 5 files changed +39
-11
lines changed Expand file tree Collapse file tree 5 files changed +39
-11
lines changed Original file line number Diff line number Diff line change 1
1
name : cerebro
2
- version : 2.1 .0
2
+ version : 2.2 .0
3
3
appVersion : 0.9.4
4
4
apiVersion : v2
5
5
description : A Helm chart for Cerebro - a web admin tool to manage ElasticSearch
Original file line number Diff line number Diff line change 30
30
{{- toYaml .Values.deployment.podLabels | nindent 8 }}
31
31
{{- end }}
32
32
annotations :
33
- checksum/config : {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
33
+ checksum/config : {{ include (print $.Template.BasePath "/secret-app .yaml") . | sha256sum }}
34
34
{{- if .Values.deployment.podAnnotations }}
35
35
{{- toYaml .Values.deployment.podAnnotations | nindent 8 }}
36
36
{{- end }}
@@ -77,11 +77,13 @@ spec:
77
77
value : {{ $element | quote }}
78
78
{{- end }}
79
79
{{- end }}
80
- {{- if .Values.envFromSecretRef }}
81
80
envFrom :
81
+ - secretRef :
82
+ name : {{ template "cerebro.fullname" . }}-vars
83
+ {{- if .Values.envFromSecretRef }}
82
84
- secretRef :
83
85
name : " {{ .Values.envFromSecretRef }}"
84
- {{- end }}
86
+ {{- end }}
85
87
{{- if .Values.deployment.livenessProbe.enabled}}
86
88
livenessProbe :
87
89
httpGet :
@@ -117,7 +119,7 @@ spec:
117
119
{{- else }}
118
120
- name : config
119
121
secret :
120
- secretName : {{ template "cerebro.fullname" . }}
122
+ secretName : {{ template "cerebro.fullname" . }}-app
121
123
{{- end }}
122
124
{{- with .Values.nodeSelector }}
123
125
nodeSelector :
Original file line number Diff line number Diff line change @@ -3,19 +3,15 @@ apiVersion: v1
3
3
kind : Secret
4
4
type : Opaque
5
5
metadata :
6
- name : {{ template "cerebro.fullname" . }}
6
+ name : {{ template "cerebro.fullname" . }}-app
7
7
labels :
8
8
app : {{ template "cerebro.name" . }}
9
9
chart : {{ template "cerebro.chart" . }}
10
10
release : {{ .Release.Name }}
11
11
heritage : {{ .Release.Service }}
12
12
stringData :
13
13
application.conf : |-
14
- {{- if .Values.config.secret }}
15
- secret = {{ .Values.config.secret | quote }}
16
- {{- else }}
17
- secret = {{ randAlphaNum 64 | quote }}
18
- {{- end }}
14
+ secret = ${?CEREBRO_COOKIE_SECRET}
19
15
20
16
{{- if .Values.config.tlsVerify }}
21
17
play.ws.ssl.loose.acceptAnyCertificate = false
@@ -79,8 +75,16 @@ stringData:
79
75
{{- end }}
80
76
{{- if $element.auth }}
81
77
auth = {
78
+ {{- if hasPrefix "${?" $element.auth.username }}
79
+ username = {{ $element.auth.username }}
80
+ {{- else }}
82
81
username = {{ $element.auth.username | quote }}
82
+ {{- end }}
83
+ {{- if hasPrefix "${?" $element.auth.password }}
84
+ password = {{ $element.auth.password }}
85
+ {{- else }}
83
86
password = {{ $element.auth.password | quote }}
87
+ {{- end }}
84
88
}
85
89
{{- end }}
86
90
}
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : Secret
3
+ type : Opaque
4
+ metadata :
5
+ name : {{ template "cerebro.fullname" . }}-vars
6
+ labels :
7
+ app : {{ template "cerebro.name" . }}
8
+ chart : {{ template "cerebro.chart" . }}
9
+ release : {{ .Release.Name }}
10
+ heritage : {{ .Release.Service }}
11
+ data :
12
+ {{- if .Values.config.secret }}
13
+ CEREBRO_COOKIE_SECRET : {{ .Values.config.secret | b64enc | quote }}
14
+ {{- else }}
15
+ CEREBRO_COOKIE_SECRET : {{ randAlphaNum 64 | b64enc | quote }}
16
+ {{- end }}
17
+ {{- range $index, $element := .Values.secretEnv }}
18
+ {{ $index }}: {{ $element | b64enc | quote }}
19
+ {{- end }}
Original file line number Diff line number Diff line change @@ -67,6 +67,9 @@ env: {}
67
67
# AUTH_TYPE: "basic"
68
68
# BASIC_AUTH_USER: "admin"
69
69
70
+ secretEnv : {}
71
+ # BASIC_AUTH_PWD: "secretpass"
72
+
70
73
# Reference to a Secret object with environment variables
71
74
# envFromSecretRef: 'my-secret-ref'
72
75
You can’t perform that action at this time.
0 commit comments