Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ spec:
{{- include "node-observer.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
labels:
{{- include "node-observer.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
Expand Down
5 changes: 3 additions & 2 deletions charts/topograph/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ spec:
{{- include "topograph.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yml") . | sha256sum }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 External ConfigMaps not tracked by checksum

The checksum/config annotation hashes only the internally-managed configmap.yml. The topograph deployment also mounts a second ConfigMap — the GCP workload identity federation credentialsConfigmap ($providerParams.workloadIdentityFederation.credentialsConfigmap) — which is managed outside this chart. Changes to that external ConfigMap will not change the annotation and therefore will not trigger a rolling restart. If that config can be updated independently (e.g. token audience or service account rotation), operators would need to manually trigger a restart. This is a known limitation of the single-file checksum approach and may be acceptable, but it's worth documenting.

{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
labels:
{{- include "topograph.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: 8c86665b467e950f383a161291a425c6a1a14dec5f55811a050a1365664b98bb
labels:
helm.sh/chart: node-observer-0.4.0
app.kubernetes.io/name: node-observer
Expand Down Expand Up @@ -328,6 +330,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: 836840c11e383b7f18a9085db3cb4c200b27cc1744b098bc46b7951f0ff22471
labels:
helm.sh/chart: topograph-0.4.0
app.kubernetes.io/name: topograph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: b795bbb9a6c84b7e4d2bd5c6cde293223296918ad3882405cf3fee6fa6166c87
labels:
helm.sh/chart: node-observer-0.4.0
app.kubernetes.io/name: node-observer
Expand Down Expand Up @@ -335,6 +337,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: 836840c11e383b7f18a9085db3cb4c200b27cc1744b098bc46b7951f0ff22471
labels:
helm.sh/chart: topograph-0.4.0
app.kubernetes.io/name: topograph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: 80f4a4ca0fe774a86e873eb84aa45652c5e7aa0d45d846ea86d39e9b34ecdb4c
labels:
helm.sh/chart: node-observer-0.4.0
app.kubernetes.io/name: node-observer
Expand Down Expand Up @@ -333,6 +335,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: 836840c11e383b7f18a9085db3cb4c200b27cc1744b098bc46b7951f0ff22471
labels:
helm.sh/chart: topograph-0.4.0
app.kubernetes.io/name: topograph
Expand Down
4 changes: 4 additions & 0 deletions tests/charts/values.k8s.ib-example.yaml.golden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: 9d0e2685aae302184e282786d4365262d8f1b2a4b1c6278e819572f234abe0fd
labels:
helm.sh/chart: node-observer-0.4.0
app.kubernetes.io/name: node-observer
Expand Down Expand Up @@ -356,6 +358,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: 836840c11e383b7f18a9085db3cb4c200b27cc1744b098bc46b7951f0ff22471
labels:
helm.sh/chart: topograph-0.4.0
app.kubernetes.io/name: topograph
Expand Down
4 changes: 4 additions & 0 deletions tests/charts/values.slinky.block-example.yaml.golden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: 5d06d9cbac1643f15efaa7659261d182a189052a9194008d6e29712b2c898ca6
labels:
helm.sh/chart: node-observer-0.4.0
app.kubernetes.io/name: node-observer
Expand Down Expand Up @@ -351,6 +353,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: 836840c11e383b7f18a9085db3cb4c200b27cc1744b098bc46b7951f0ff22471
labels:
helm.sh/chart: topograph-0.4.0
app.kubernetes.io/name: topograph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: 92d871f440d55edcbbf54dfbe5ae93bb13441f689d0b9c1cce7d21d53bb97ac3
labels:
helm.sh/chart: node-observer-0.4.0
app.kubernetes.io/name: node-observer
Expand Down Expand Up @@ -368,6 +370,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: 836840c11e383b7f18a9085db3cb4c200b27cc1744b098bc46b7951f0ff22471
labels:
helm.sh/chart: topograph-0.4.0
app.kubernetes.io/name: topograph
Expand Down
4 changes: 4 additions & 0 deletions tests/charts/values.slinky.tree-example.yaml.golden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: 6acc8cb0fdf4b308b7443ce28c6b59ad5277fd5993aee91b25c506a2f452b4e2
labels:
helm.sh/chart: node-observer-0.4.0
app.kubernetes.io/name: node-observer
Expand Down Expand Up @@ -343,6 +345,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: 836840c11e383b7f18a9085db3cb4c200b27cc1744b098bc46b7951f0ff22471
labels:
helm.sh/chart: topograph-0.4.0
app.kubernetes.io/name: topograph
Expand Down
4 changes: 4 additions & 0 deletions tests/charts/values.yaml.golden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: 8c86665b467e950f383a161291a425c6a1a14dec5f55811a050a1365664b98bb
labels:
helm.sh/chart: node-observer-0.4.0
app.kubernetes.io/name: node-observer
Expand Down Expand Up @@ -328,6 +330,8 @@ spec:
app.kubernetes.io/instance: chart-ci
template:
metadata:
annotations:
checksum/config: 836840c11e383b7f18a9085db3cb4c200b27cc1744b098bc46b7951f0ff22471
labels:
helm.sh/chart: topograph-0.4.0
app.kubernetes.io/name: topograph
Expand Down