File tree Expand file tree Collapse file tree 4 files changed +32
-2
lines changed Expand file tree Collapse file tree 4 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 1
- 0.1.6
1
+ 0.1.7-rc.7
Original file line number Diff line number Diff line change @@ -18,10 +18,15 @@ metadata:
18
18
name : {{ $fullName }}
19
19
labels :
20
20
{{- include "kuberoapp.labels" . | nindent 4 }}
21
- {{- with .Values.ingress.annotations }}
22
21
annotations :
22
+ {{- with .Values.ingress.annotations }}
23
23
{{- toYaml . | nindent 4 }}
24
24
{{- end }}
25
+ {{- if .Values.basicAuth.enabled }}
26
+ nginx.ingress.kubernetes.io/auth-secret : {{ include "kuberoapp.fullname" . }}-htpasswd
27
+ nginx.ingress.kubernetes.io/auth-type : basic
28
+ nginx.ingress.kubernetes.io/auth-realm : {{ .Values.basicAuth.realm | quote }}
29
+ {{- end }}
25
30
spec :
26
31
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
27
32
ingressClassName : {{ .Values.ingress.className }}
Original file line number Diff line number Diff line change
1
+ {{- if gt (len .Values.basicAuth.accounts) 0 }}
2
+ {{- $accounts := .Values.basicAuth.accounts }}
3
+ {{- $val := "" }}
4
+ {{- range $account := $accounts }}
5
+ {{- $val = printf "%s%s\n" $val $account.hash }}
6
+ {{- end }}
7
+ apiVersion : v1
8
+ kind : Secret
9
+ metadata :
10
+ name : {{ include "kuberoapp.fullname" . }}-htpasswd
11
+ type : Opaque
12
+ data :
13
+ auth : {{ $val | trimSuffix "\n" | b64enc }}
14
+ {{- end }}
Original file line number Diff line number Diff line change @@ -158,6 +158,17 @@ resources: {}
158
158
# cpu: 100m
159
159
# memory: 128Mi
160
160
161
+ basicAuth :
162
+ enabled : false
163
+ realm : " Protected"
164
+ accounts : []
165
+ # - user: foo
166
+ # pass: bar
167
+ # hash: ""
168
+ # - user: bar
169
+ # pass: foo
170
+ # hash: ""
171
+
161
172
autoscaling :
162
173
enabled : false
163
174
You can’t perform that action at this time.
0 commit comments