File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -188,3 +188,13 @@ Validate replica authentication configuration
188188{{- end }}
189189{{- end -}}
190190
191+ {{/*
192+ Which caFile to use
193+ */ }}
194+ {{- define " valkey.caFile" -}}
195+ {{- if .Values.tls.alternativeClientCa }}
196+ {{- .Values.tls.alternativeClientCa }}
197+ {{- else }}
198+ {{- printf " /tls/%s " .Values.tls.caPublicKey }}
199+ {{- end }}
200+ {{- end -}}
Original file line number Diff line number Diff line change @@ -115,14 +115,14 @@ spec:
115115 startupProbe :
116116 exec :
117117 {{- if .Values.tls.enabled }}
118- command : [ "sh", "-c", "valkey-cli --cacert /tls/ {{ .Values.tls.caPublicKey }} --tls ping" ]
118+ command : [ "sh", "-c", "valkey-cli --cacert {{ include "valkey.caFile" . }} --tls ping" ]
119119 {{- else }}
120120 command : [ "sh", "-c", "valkey-cli ping" ]
121121 {{- end }}
122122 livenessProbe :
123123 exec :
124124 {{- if .Values.tls.enabled }}
125- command : [ "sh", "-c", "valkey-cli --cacert /tls/ {{ .Values.tls.caPublicKey }} --tls ping" ]
125+ command : [ "sh", "-c", "valkey-cli --cacert {{ include "valkey.caFile" . }} --tls ping" ]
126126 {{- else }}
127127 command : [ "sh", "-c", "valkey-cli ping" ]
128128 {{- end }}
Original file line number Diff line number Diff line change @@ -132,14 +132,14 @@ spec:
132132 startupProbe :
133133 exec :
134134 {{- if .Values.tls.enabled }}
135- command : [ "sh", "-c", "valkey-cli --cacert /tls/ {{ .Values.tls.caPublicKey }} --tls ping" ]
135+ command : [ "sh", "-c", "valkey-cli --cacert {{ include "valkey.caFile" . }} --tls ping" ]
136136 {{- else }}
137137 command : [ "sh", "-c", "valkey-cli ping" ]
138138 {{- end }}
139139 livenessProbe :
140140 exec :
141141 {{- if .Values.tls.enabled }}
142- command : [ "sh", "-c", "valkey-cli --cacert /tls/ {{ .Values.tls.caPublicKey }} --tls ping" ]
142+ command : [ "sh", "-c", "valkey-cli --cacert {{ include "valkey.caFile" . }} --tls ping" ]
143143 {{- else }}
144144 command : [ "sh", "-c", "valkey-cli ping" ]
145145 {{- end }}
Original file line number Diff line number Diff line change 3535
3636 {{- if .Values.tls.enabled }}
3737 # TLS flags
38- TLS_FLAGS="--tls --cacert /tls/ {{ .Values.tls.caPublicKey }}"
38+ TLS_FLAGS="--tls --cacert {{ include "valkey.caFile" . }}"
3939 {{- else }}
4040 TLS_FLAGS=""
4141 {{- end }}
@@ -107,7 +107,7 @@ spec:
107107
108108 {{- if .Values.tls.enabled }}
109109 # TLS flags
110- TLS_FLAGS="--tls --cacert /tls/ {{ .Values.tls.caPublicKey }}"
110+ TLS_FLAGS="--tls --cacert {{ include "valkey.caFile" . }}"
111111 {{- else }}
112112 TLS_FLAGS=""
113113 {{- end }}
Original file line number Diff line number Diff line change 519519 "caPublicKey" : {
520520 "type" : " string"
521521 },
522+ "alternativeClientCa" : {
523+ "type" : " string"
524+ },
522525 "dhParamKey" : {
523526 "type" : " string"
524527 },
Original file line number Diff line number Diff line change 269269 serverKey : server.key
270270 # Secret key name containing Certificate Authority public certificate
271271 caPublicKey : ca.crt
272+ # in case the caPublicKey does not work for the client (e.g. valkey-cli), you can set an alternative CA cert as an absolute path here.
273+ # Useful e.g. for trust-manager in combination with cert-manager-generated ACME certs.
274+ alternativeClientCa : " "
272275 # Secret key name containing DH parameters (optional)
273276 dhParamKey : " "
274277 # Require that clients authenticate with a certificate
You can’t perform that action at this time.
0 commit comments