File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -60,3 +60,13 @@ Create the name of the service account to use
60
60
{ {- default " default" .Values.serviceAccount.name } }
61
61
{ {- end } }
62
62
{ {- end } }
63
+
64
+ { {/*
65
+ Generate a checksum of the specified template file.
66
+ */} }
67
+ { {- define " pgcat.checksum" -} }
68
+ { {- $files := .Files -} }
69
+ { {- $secretPath := (print $.Template.BasePath " /secret.yaml" ) -} }
70
+ { {- $secret := $files .Get $secretPath -} }
71
+ { {- sha256sum $secret -} }
72
+ { {- end } }
Original file line number Diff line number Diff line change 12
12
template :
13
13
metadata :
14
14
annotations :
15
- checksum/secret : {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
15
+ checksum/secret : {{ include "pgcat.checksum" . }}
16
16
{{- with .Values.podAnnotations }}
17
17
{{- toYaml . | nindent 8 }}
18
18
{{- end }}
You can’t perform that action at this time.
0 commit comments