Skip to content

Commit

Permalink
do not create htpasswd on the fly in template since the operator goes…
Browse files Browse the repository at this point in the history
… crazy
  • Loading branch information
mms-gianni committed Jan 13, 2025
1 parent 163c844 commit 94ec399
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.7-rc.6
0.1.7-rc.7
2 changes: 1 addition & 1 deletion helm-charts/kuberoapp/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ metadata:
{{- with .Values.ingress.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if gt (len .Values.basicAuth.accounts) 0 }}
{{- if .Values.basicAuth.enabled }}
nginx.ingress.kubernetes.io/auth-secret: {{ include "kuberoapp.fullname" . }}-htpasswd
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-realm: {{ .Values.basicAuth.realm | quote }}
Expand Down
3 changes: 1 addition & 2 deletions helm-charts/kuberoapp/templates/secret-basic-auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
{{- $accounts := .Values.basicAuth.accounts }}
{{- $val := "" }}
{{- range $account := $accounts }}
{{- $hash := htpasswd $account.user $account.pass }}
{{- $val = printf "%s%s\n" $val $hash }}
{{- $val = printf "%s%s\n" $val $account.hash }}
{{- end }}
apiVersion: v1
kind: Secret
Expand Down
3 changes: 3 additions & 0 deletions helm-charts/kuberoapp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,15 @@ resources: {}
# memory: 128Mi

basicAuth:
enabled: false
realm: "Protected"
accounts: []
#- user: foo
# pass: bar
# hash: ""
#- user: bar
# pass: foo
# hash: ""

autoscaling:
enabled: false
Expand Down

0 comments on commit 94ec399

Please sign in to comment.