blob: aa6e72d81e575f1a2eb832ebc6fcc93a7da7c5c1 [file] [log] [blame]
Oleksandr Kozachenkob0093492023-09-06 21:43:47 +02001{{- /*
2Copyright VMware, Inc.
3SPDX-License-Identifier: APACHE-2.0
4*/}}
5
6{{- if and (or .Values.tls.keystorePassword .Values.tls.truststorePassword) (not .Values.tls.passwordsSecret) }}
7apiVersion: v1
8kind: Secret
9metadata:
10 name: {{ printf "%s-tls-passwords" (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 {{- if .Values.tls.keystorePassword }}
23 tls-keystore-password: {{ .Values.tls.keystorePassword | b64enc | quote }}
24 {{- end }}
25 {{- if .Values.tls.truststorePassword }}
26 tls-truststore-password: {{ .Values.tls.truststorePassword | b64enc | quote }}
27 {{- end }}
28---
29{{- end }}
30{{- if and .Values.spi.truststorePassword (not .Values.spi.passwordsSecret) }}
31apiVersion: v1
32kind: Secret
33metadata:
34 name: {{ printf "%s-spi-passwords" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
35 namespace: {{ include "common.names.namespace" . | quote }}
36 labels: {{- include "common.labels.standard" . | nindent 4 }}
37 app.kubernetes.io/component: keycloak
38 {{- if .Values.commonLabels }}
39 {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
40 {{- end }}
41 {{- if .Values.commonAnnotations }}
42 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
43 {{- end }}
44type: Opaque
45data:
46 {{- if .Values.spi.truststorePassword }}
47 spi-truststore-password: {{ .Values.spi.truststorePassword | b64enc | quote }}
48 {{- end }}
49{{- end }}