File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ appVersion: v2.0.1
33description : A Helm chart for Kubernetes
44name : zot
55type : application
6- version : 0.1.46
6+ version : 0.1.47
Original file line number Diff line number Diff line change @@ -11,10 +11,13 @@ spec:
1111 {{- include "zot.selectorLabels" . | nindent 6 }}
1212 template :
1313 metadata :
14- {{- with .Values.podAnnotations }}
1514 annotations :
15+ {{- with .Values.podAnnotations }}
1616 {{- toYaml . | nindent 8 }}
17- {{- end }}
17+ {{- end }}
18+ {{- if and .Values.mountConfig .Values.configFiles }}
19+ checksum/config : {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
20+ {{- end }}
1821 labels :
1922 {{- include "zot.selectorLabels" . | nindent 8 }}
2023 spec :
Original file line number Diff line number Diff line change 1+ suite : configmap checksum in deployment
2+ # Can't use global templates in this test suite as it will break the checksum calculation
3+ # causing false negative test outcome.
4+ # templates:
5+ # - deployment.yaml
6+ tests :
7+ - it : has no checksum/config if no config
8+ template : deployment.yaml
9+ asserts :
10+ - isNull :
11+ path : spec.template.metadata.annotations.checksum/config
12+ - it : generate checksum/config if config is present
13+ template : deployment.yaml
14+ set :
15+ mountConfig : true
16+ configFiles :
17+ config.json : " {}"
18+ asserts :
19+ - isNotNull :
20+ path : spec.template.metadata.annotations.checksum/config
21+ - matchRegex :
22+ path : spec.template.metadata.annotations.checksum/config
23+ pattern : " ^[a-f0-9]{64}$" # SHA256 hex output
Original file line number Diff line number Diff line change @@ -171,3 +171,5 @@ extraVolumeMounts: []
171171extraVolumes : []
172172# - name: data
173173# emptyDir: {}
174+
175+ podAnnotations : {}
You can’t perform that action at this time.
0 commit comments