File tree 3 files changed +11
-5
lines changed
charts/apl-keycloak-operator/templates
values/apl-keycloak-operator
3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 31
31
{{- toYaml .Values.securityContext | nindent 12 }}
32
32
image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
33
33
imagePullPolicy : {{ .Values.image.pullPolicy }}
34
- {{- if and .Values.configs (not (empty .Values.configs.tls.certificates)) }}
34
+ {{- if (not (empty .Values.configs.tls.certificates)) }}
35
35
command : ['/bin/sh', '-c']
36
36
args : ['export NODE_EXTRA_CA_CERTS=/app/config/tls/certificate.crt && npm run operator:keycloak']
37
37
env :
@@ -42,10 +42,12 @@ spec:
42
42
{{- end }}
43
43
resources :
44
44
{{- toYaml .Values.resources | nindent 12 }}
45
+ {{- if (not (empty .Values.configs.tls.certificates)) }}
45
46
volumeMounts :
46
47
- name : tls-certs
47
48
mountPath : /app/config/tls/certificate.crt
48
49
subPath : certificate.crt
50
+ {{- end }}
49
51
{{- with .Values.nodeSelector }}
50
52
nodeSelector :
51
53
{{- toYaml . | nindent 8 }}
59
61
{{- toYaml . | nindent 8 }}
60
62
{{- end }}
61
63
volumes :
64
+ {{- if (not (empty .Values.configs.tls.certificates)) }}
62
65
- name : tls-certs
63
66
secret :
64
67
secretName : keycloak-operator-tls-certs-cm
68
+ {{- end }}
65
69
- name : operator-config-kc
66
70
configMap :
67
71
name : apl-keycloak-operator-cm
Original file line number Diff line number Diff line change 1
- {{- with .Values.configs.tls.certificates.caCert }}
1
+ {{- if and .Values.configs .Values.configs.tls .Values.configs.tls.certificates .Values.configs.tls.certificates.caCert }}
2
2
apiVersion : v1
3
3
kind : Secret
4
4
metadata :
5
5
name : keycloak-operator-tls-certs-cm
6
6
namespace : apl-keycloak-operator
7
7
data :
8
- certificate.crt : {{- . | b64enc | nindent 4 }}
8
+ certificate.crt : {{- .Values.configs.tls.certificates.caCert | b64enc | nindent 4 }}
9
9
{{- end }}
Original file line number Diff line number Diff line change @@ -12,12 +12,14 @@ imagePullSecrets:
12
12
- name: apl-pullsecret-global
13
13
{{- end }}
14
14
configs:
15
- {{ if $v._derived.untrustedCA }}
16
15
tls:
17
16
certificates:
17
+ {{ if $v._derived.untrustedCA }}
18
18
caCert: |
19
19
{{- $v._derived.caCert | nindent 8 }}
20
- {{ end }}
20
+ {{- else }}
21
+ {}
22
+ {{ end }}
21
23
script: |
22
24
{{- if $v._derived.untrustedCA }}
23
25
export NODE_EXTRA_CA_CERTS=/app/config/tls/certificates.crt
You can’t perform that action at this time.
0 commit comments