-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic authentication support to the Ingress configuration and cr…
…eate a secret for the basic authentication credentials in Kuberoapp.
- Loading branch information
1 parent
f5a2738
commit ffc5830
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{{- if gt (len .Values.basicAuth.accounts) 0 }} | ||
{{- $accounts := .Values.basicAuth.accounts }} | ||
{{- $val := "" }} | ||
{{- range $account := $accounts }} | ||
{{- $hash := htpasswd $account.user $account.password }} | ||
{{- $val = printf "%s%s\n" $val $hash }} | ||
{{- end }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "kuberoapp.fullname" . }}-htpasswd | ||
type: Opaque | ||
data: | ||
auth: {{ $val | trimSuffix "\n" | b64enc }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters