blob: ef313149f7427aa31b6ff19bed4e6fa2797d1edb [file] [log] [blame]
Oleksandr Kozachenkob0093492023-09-06 21:43:47 +02001{{- /*
2Copyright VMware, Inc.
3SPDX-License-Identifier: APACHE-2.0
4*/}}
5
6{{- if not .Values.auth.existingSecret }}
7apiVersion: v1
8kind: Secret
9metadata:
10 name: {{ printf "%s" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
11 namespace: {{ include "common.names.namespace" . | quote }}
12 labels: {{- include "common.labels.standard" . | nindent 4 }}
13 app.kubernetes.io/component: keycloak
14 {{- if .Values.commonLabels }}
15 {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
16 {{- end }}
17 {{- if .Values.commonAnnotations }}
18 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
19 {{- end }}
20type: Opaque
21data:
22 admin-password: {{ include "common.secrets.passwords.manage" (dict "secret" (printf "%s" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-") "key" "admin-password" "length" 10 "providedValues" (list "auth.adminPassword") "context" $) }}
23{{- end }}