Skip to content

Commit 470f0f4

Browse files
authored
Merge pull request #123 from yugabyte/hkandala/cert-rotate-checksum
[PLAT-2031] Add rootCA checksum to yb-masters and yb-tservers statefulsets
2 parents 203b724 + bd7988f commit 470f0f4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

stable/yugabyte/templates/service.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,16 +161,22 @@ spec:
161161
template:
162162
metadata:
163163
{{- if eq .name "yb-masters" }}
164-
{{- if (or $root.Values.networkAnnotation $root.Values.master.podAnnotations) }}
164+
{{- if (or $root.Values.networkAnnotation $root.Values.master.podAnnotations $root.Values.tls.enabled) }}
165165
annotations:
166166
{{- with $root.Values.networkAnnotation }}{{ toYaml . | nindent 8 }}{{ end }}
167167
{{- with $root.Values.master.podAnnotations }}{{ toYaml . | nindent 8 }}{{ end }}
168+
{{- if $root.Values.tls.enabled }}
169+
checksum/rootCA: {{ cat $root.Values.tls.rootCA.cert $root.Values.tls.rootCA.key | sha256sum }}
170+
{{- end }}
168171
{{- end }}
169172
{{- else }}
170-
{{- if (or $root.Values.networkAnnotation $root.Values.tserver.podAnnotations) }}
173+
{{- if (or $root.Values.networkAnnotation $root.Values.tserver.podAnnotations $root.Values.tls.enabled) }}
171174
annotations:
172175
{{- with $root.Values.networkAnnotation }}{{ toYaml . | nindent 8 }}{{ end }}
173176
{{- with $root.Values.tserver.podAnnotations }}{{ toYaml . | nindent 8 }}{{ end }}
177+
{{- if $root.Values.tls.enabled }}
178+
checksum/rootCA: {{ cat $root.Values.tls.rootCA.cert $root.Values.tls.rootCA.key | sha256sum }}
179+
{{- end }}
174180
{{- end }}
175181
{{- end }}
176182
labels:

0 commit comments

Comments
 (0)