Oleksandr Kozachenko | b009349 | 2023-09-06 21:43:47 +0200 | [diff] [blame] | 1 | {{- /* |
| 2 | Copyright VMware, Inc. |
| 3 | SPDX-License-Identifier: APACHE-2.0 |
| 4 | */}} |
| 5 | |
| 6 | {{- if and (or .Values.tls.keystorePassword .Values.tls.truststorePassword) (not .Values.tls.passwordsSecret) }} |
| 7 | apiVersion: v1 |
| 8 | kind: Secret |
| 9 | metadata: |
| 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 }} |
| 20 | type: Opaque |
| 21 | data: |
| 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) }} |
| 31 | apiVersion: v1 |
| 32 | kind: Secret |
| 33 | metadata: |
| 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 }} |
| 44 | type: Opaque |
| 45 | data: |
| 46 | {{- if .Values.spi.truststorePassword }} |
| 47 | spi-truststore-password: {{ .Values.spi.truststorePassword | b64enc | quote }} |
| 48 | {{- end }} |
| 49 | {{- end }} |