aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/authentication/components/oauth2-proxy/templates/secret-htpasswd-file.yaml
blob: c5ea330ff7484e9ecc226835b2df76242edb0214 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{{- if and .Values.htpasswdFile.enabled (not .Values.htpasswdFile.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
  labels:
    app: {{ template "oauth2-proxy.name" . }}
{{- include "oauth2-proxy.labels" . | indent 4 }}
  name: {{ template "oauth2-proxy.fullname" . }}-htpasswd-file
  namespace: {{ template "oauth2-proxy.namespace" $ }}
type: Opaque
stringData:
  users.txt: |-
    {{- range $entries := .Values.htpasswdFile.entries }}
    {{ $entries }}
    {{- end -}}
{{- end }}