helm-charts/openfaas/templates/secret.yaml

20 lines
618 B
YAML
Raw Normal View History

2021-01-17 01:09:41 +00:00
{{- if .Values.generateBasicAuth }}
apiVersion: v1
kind: Secret
metadata:
name: basic-auth
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "openfaas.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: gateway
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
annotations:
"helm.sh/hook": "pre-install"
data:
basic-auth-user: {{ "admin" | b64enc | quote }}
# kubectl -n openfaas get secret basic-auth -o jsonpath="{.data.basic-auth-password}" | base64 --decode
basic-auth-password: {{ randAlphaNum 12 | b64enc | quote }}
{{- end }}