-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: compute ConfigMap/Secret checksum only over .data content #15177
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this makes sense. Do you think we should extract the checksum calculation into a helper function?
@@ -1083,7 +1083,7 @@ enableServiceLinks: false | |||
{{- end }} | |||
|
|||
{{- define "loki.config.checksum" -}} | |||
checksum/config: {{ include (print .Template.BasePath "/config.yaml") . | sha256sum }} | |||
checksum/config: {{ get (include (print .Template.BasePath "/config.yaml") . | fromYaml) "data" | toYaml | sha256sum }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be extracted into a helper function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be, yes. But we have a parameterization here, which is the actual config yaml file name, which is not always /config.yaml
. It may also be /gateway/configmap-gateway.yaml
in deployment-gateway-nginx.
That means, we likely want to create a "parameter dict(ionary)", something like:
{{/*
compute a ConfigMap or Secret checksum only based on the .data content
*/}}
{{- define "loki.configMapOrSecretContentHash" -}}
{{ get (include (print .ctx.Template.BasePath .name) .ctx | fromYaml) "data" | toYaml | sha256sum }}
{{- end }}
and usage:
checksum/config: {{ include "loki.configMapOrSecretContentHash" (dict "ctx" . "name" "/config.yaml") }}
and:
checksum/config: {{ include "loki.configMapOrSecretContentHash" (dict "ctx" . "name" "/gateway/configmap-gateway.yaml") }}
That may look uncommon, but does work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have implemented it like that now.
Kubernetes Manifest Diff SummaryScenario: default-single-binary-values (Added: 0, Modified: 11, Removed: 0)
Summary:
Added FilesNo added files Modified Filesloki/templates/querier/deployment-querier.yaml*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/querier/deployment-querier.yaml 2024-11-29 08:02:23.015598255 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/querier/deployment-querier.yaml 2024-11-29 08:02:25.279629744 +0000
***************
*** 27,33 ****
template:
metadata:
annotations:
! checksum/config: 5ca7d8f0348c1f26d1f20a5711d6746a0f9cb917eee69b86bbaa55db65ecf8b4
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 27,33 ----
template:
metadata:
annotations:
! checksum/config: 46f5a44df70788fd14ee74c61219c63987c7ae39eb9d4bc3096b30bc5369f62f
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/query-frontend/deployment-query-frontend.yaml*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/query-frontend/deployment-query-frontend.yaml 2024-11-29 08:02:23.015598255 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/query-frontend/deployment-query-frontend.yaml 2024-11-29 08:02:25.279629744 +0000
***************
*** 26,32 ****
template:
metadata:
annotations:
! checksum/config: 5ca7d8f0348c1f26d1f20a5711d6746a0f9cb917eee69b86bbaa55db65ecf8b4
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 26,32 ----
template:
metadata:
annotations:
! checksum/config: 46f5a44df70788fd14ee74c61219c63987c7ae39eb9d4bc3096b30bc5369f62f
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/compactor/statefulset-compactor.yaml*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/compactor/statefulset-compactor.yaml 2024-11-29 08:02:23.015598255 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/compactor/statefulset-compactor.yaml 2024-11-29 08:02:25.279629744 +0000
***************
*** 28,34 ****
template:
metadata:
annotations:
! checksum/config: 5ca7d8f0348c1f26d1f20a5711d6746a0f9cb917eee69b86bbaa55db65ecf8b4
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 28,34 ----
template:
metadata:
annotations:
! checksum/config: 46f5a44df70788fd14ee74c61219c63987c7ae39eb9d4bc3096b30bc5369f62f
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/gateway/deployment-gateway-nginx.yaml*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/gateway/deployment-gateway-nginx.yaml 2024-11-29 08:02:23.015598255 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/gateway/deployment-gateway-nginx.yaml 2024-11-29 08:02:25.275629686 +0000
***************
*** 24,30 ****
template:
metadata:
annotations:
! checksum/config: bd74e21030f72af17a043c3a967f82177c5143a74228d3cda74bb012d3e33948
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 24,30 ----
template:
metadata:
annotations:
! checksum/config: e8e8eedfb8410d2ade744459cfef568b6db982cc3776e115d5129e250d51872f
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/query-scheduler/deployment-query-scheduler.yaml*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/query-scheduler/deployment-query-scheduler.yaml 2024-11-29 08:02:23.015598255 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/query-scheduler/deployment-query-scheduler.yaml 2024-11-29 08:02:25.279629744 +0000
***************
*** 26,32 ****
template:
metadata:
annotations:
! checksum/config: 5ca7d8f0348c1f26d1f20a5711d6746a0f9cb917eee69b86bbaa55db65ecf8b4
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 26,32 ----
template:
metadata:
annotations:
! checksum/config: 46f5a44df70788fd14ee74c61219c63987c7ae39eb9d4bc3096b30bc5369f62f
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/ruler/statefulset-ruler.yaml*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/ruler/statefulset-ruler.yaml 2024-11-29 08:02:23.015598255 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/ruler/statefulset-ruler.yaml 2024-11-29 08:02:25.279629744 +0000
***************
*** 24,30 ****
template:
metadata:
annotations:
! checksum/config: 5ca7d8f0348c1f26d1f20a5711d6746a0f9cb917eee69b86bbaa55db65ecf8b4
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 24,30 ----
template:
metadata:
annotations:
! checksum/config: 46f5a44df70788fd14ee74c61219c63987c7ae39eb9d4bc3096b30bc5369f62f
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/index-gateway/statefulset-index-gateway.yaml*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/index-gateway/statefulset-index-gateway.yaml 2024-11-29 08:02:23.015598255 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/index-gateway/statefulset-index-gateway.yaml 2024-11-29 08:02:25.279629744 +0000
***************
*** 25,31 ****
template:
metadata:
annotations:
! checksum/config: 5ca7d8f0348c1f26d1f20a5711d6746a0f9cb917eee69b86bbaa55db65ecf8b4
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 25,31 ----
template:
metadata:
annotations:
! checksum/config: 46f5a44df70788fd14ee74c61219c63987c7ae39eb9d4bc3096b30bc5369f62f
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/ingester/statefulset-ingester-zone-c.yaml*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/ingester/statefulset-ingester-zone-c.yaml 2024-11-29 08:02:23.015598255 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/ingester/statefulset-ingester-zone-c.yaml 2024-11-29 08:02:25.279629744 +0000
***************
*** 33,39 ****
template:
metadata:
annotations:
! checksum/config: 5ca7d8f0348c1f26d1f20a5711d6746a0f9cb917eee69b86bbaa55db65ecf8b4
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 33,39 ----
template:
metadata:
annotations:
! checksum/config: 46f5a44df70788fd14ee74c61219c63987c7ae39eb9d4bc3096b30bc5369f62f
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/ingester/statefulset-ingester-zone-b.yaml*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/ingester/statefulset-ingester-zone-b.yaml 2024-11-29 08:02:23.015598255 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/ingester/statefulset-ingester-zone-b.yaml 2024-11-29 08:02:25.279629744 +0000
***************
*** 33,39 ****
template:
metadata:
annotations:
! checksum/config: 5ca7d8f0348c1f26d1f20a5711d6746a0f9cb917eee69b86bbaa55db65ecf8b4
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 33,39 ----
template:
metadata:
annotations:
! checksum/config: 46f5a44df70788fd14ee74c61219c63987c7ae39eb9d4bc3096b30bc5369f62f
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/ingester/statefulset-ingester-zone-a.yaml*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/ingester/statefulset-ingester-zone-a.yaml 2024-11-29 08:02:23.015598255 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/ingester/statefulset-ingester-zone-a.yaml 2024-11-29 08:02:25.279629744 +0000
***************
*** 33,39 ****
template:
metadata:
annotations:
! checksum/config: 5ca7d8f0348c1f26d1f20a5711d6746a0f9cb917eee69b86bbaa55db65ecf8b4
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 33,39 ----
template:
metadata:
annotations:
! checksum/config: 46f5a44df70788fd14ee74c61219c63987c7ae39eb9d4bc3096b30bc5369f62f
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/distributor/deployment-distributor.yaml*** /home/runner/work/loki/loki/output/base/default-single-binary-values/loki/templates/distributor/deployment-distributor.yaml 2024-11-29 08:02:23.015598255 +0000
--- /home/runner/work/loki/loki/output/pr/default-single-binary-values/loki/templates/distributor/deployment-distributor.yaml 2024-11-29 08:02:25.275629686 +0000
***************
*** 27,33 ****
template:
metadata:
annotations:
! checksum/config: 5ca7d8f0348c1f26d1f20a5711d6746a0f9cb917eee69b86bbaa55db65ecf8b4
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 27,33 ----
template:
metadata:
annotations:
! checksum/config: 46f5a44df70788fd14ee74c61219c63987c7ae39eb9d4bc3096b30bc5369f62f
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name Removed FilesNo removed files Scenario: default-values (Added: 0, Modified: 4, Removed: 0)
Summary:
Added FilesNo added files Modified Filesloki/templates/read/deployment-read.yaml*** /home/runner/work/loki/loki/output/base/default-values/loki/templates/read/deployment-read.yaml 2024-11-29 08:02:23.119599691 +0000
--- /home/runner/work/loki/loki/output/pr/default-values/loki/templates/read/deployment-read.yaml 2024-11-29 08:02:25.379631216 +0000
***************
*** 27,33 ****
template:
metadata:
annotations:
! checksum/config: e9fb96ccbb6301a58fa706346b03e0fd3574001a1366066686245aa16e5f4f83
labels:
app.kubernetes.io/part-of: memberlist
app.kubernetes.io/name: loki
--- 27,33 ----
template:
metadata:
annotations:
! checksum/config: abacff2ab380333fcb8322e8c3987bee7ab648f9db87be2057b26c14d29228d5
labels:
app.kubernetes.io/part-of: memberlist
app.kubernetes.io/name: loki loki/templates/write/statefulset-write.yaml*** /home/runner/work/loki/loki/output/base/default-values/loki/templates/write/statefulset-write.yaml 2024-11-29 08:02:23.119599691 +0000
--- /home/runner/work/loki/loki/output/pr/default-values/loki/templates/write/statefulset-write.yaml 2024-11-29 08:02:25.379631216 +0000
***************
*** 28,34 ****
template:
metadata:
annotations:
! checksum/config: e9fb96ccbb6301a58fa706346b03e0fd3574001a1366066686245aa16e5f4f83
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 28,34 ----
template:
metadata:
annotations:
! checksum/config: abacff2ab380333fcb8322e8c3987bee7ab648f9db87be2057b26c14d29228d5
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/gateway/deployment-gateway-nginx.yaml*** /home/runner/work/loki/loki/output/base/default-values/loki/templates/gateway/deployment-gateway-nginx.yaml 2024-11-29 08:02:23.119599691 +0000
--- /home/runner/work/loki/loki/output/pr/default-values/loki/templates/gateway/deployment-gateway-nginx.yaml 2024-11-29 08:02:25.375631157 +0000
***************
*** 24,30 ****
template:
metadata:
annotations:
! checksum/config: 02378006d36e6588fc623cd6ad5b89a61ffd58cc7b0260493d6d1cb2dc70ce13
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 24,30 ----
template:
metadata:
annotations:
! checksum/config: afcb9bfc2815e2b94ccffd596b5dd75cc464bc5c564681571214bccff9c1951a
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/backend/statefulset-backend.yaml*** /home/runner/work/loki/loki/output/base/default-values/loki/templates/backend/statefulset-backend.yaml 2024-11-29 08:02:23.119599691 +0000
--- /home/runner/work/loki/loki/output/pr/default-values/loki/templates/backend/statefulset-backend.yaml 2024-11-29 08:02:25.379631216 +0000
***************
*** 32,38 ****
template:
metadata:
annotations:
! checksum/config: e9fb96ccbb6301a58fa706346b03e0fd3574001a1366066686245aa16e5f4f83
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 32,38 ----
template:
metadata:
annotations:
! checksum/config: abacff2ab380333fcb8322e8c3987bee7ab648f9db87be2057b26c14d29228d5
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name Removed FilesNo removed files Scenario: ingress-values (Added: 0, Modified: 4, Removed: 0)
Summary:
Added FilesNo added files Modified Filesloki/templates/read/deployment-read.yaml*** /home/runner/work/loki/loki/output/base/ingress-values/loki/templates/read/deployment-read.yaml 2024-11-29 08:02:23.231601238 +0000
--- /home/runner/work/loki/loki/output/pr/ingress-values/loki/templates/read/deployment-read.yaml 2024-11-29 08:02:25.475632629 +0000
***************
*** 27,33 ****
template:
metadata:
annotations:
! checksum/config: e9fb96ccbb6301a58fa706346b03e0fd3574001a1366066686245aa16e5f4f83
labels:
app.kubernetes.io/part-of: memberlist
app.kubernetes.io/name: loki
--- 27,33 ----
template:
metadata:
annotations:
! checksum/config: abacff2ab380333fcb8322e8c3987bee7ab648f9db87be2057b26c14d29228d5
labels:
app.kubernetes.io/part-of: memberlist
app.kubernetes.io/name: loki loki/templates/write/statefulset-write.yaml*** /home/runner/work/loki/loki/output/base/ingress-values/loki/templates/write/statefulset-write.yaml 2024-11-29 08:02:23.231601238 +0000
--- /home/runner/work/loki/loki/output/pr/ingress-values/loki/templates/write/statefulset-write.yaml 2024-11-29 08:02:25.475632629 +0000
***************
*** 28,34 ****
template:
metadata:
annotations:
! checksum/config: e9fb96ccbb6301a58fa706346b03e0fd3574001a1366066686245aa16e5f4f83
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 28,34 ----
template:
metadata:
annotations:
! checksum/config: abacff2ab380333fcb8322e8c3987bee7ab648f9db87be2057b26c14d29228d5
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/gateway/deployment-gateway-nginx.yaml*** /home/runner/work/loki/loki/output/base/ingress-values/loki/templates/gateway/deployment-gateway-nginx.yaml 2024-11-29 08:02:23.231601238 +0000
--- /home/runner/work/loki/loki/output/pr/ingress-values/loki/templates/gateway/deployment-gateway-nginx.yaml 2024-11-29 08:02:25.475632629 +0000
***************
*** 24,30 ****
template:
metadata:
annotations:
! checksum/config: 02378006d36e6588fc623cd6ad5b89a61ffd58cc7b0260493d6d1cb2dc70ce13
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 24,30 ----
template:
metadata:
annotations:
! checksum/config: afcb9bfc2815e2b94ccffd596b5dd75cc464bc5c564681571214bccff9c1951a
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/backend/statefulset-backend.yaml*** /home/runner/work/loki/loki/output/base/ingress-values/loki/templates/backend/statefulset-backend.yaml 2024-11-29 08:02:23.231601238 +0000
--- /home/runner/work/loki/loki/output/pr/ingress-values/loki/templates/backend/statefulset-backend.yaml 2024-11-29 08:02:25.475632629 +0000
***************
*** 32,38 ****
template:
metadata:
annotations:
! checksum/config: e9fb96ccbb6301a58fa706346b03e0fd3574001a1366066686245aa16e5f4f83
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 32,38 ----
template:
metadata:
annotations:
! checksum/config: abacff2ab380333fcb8322e8c3987bee7ab648f9db87be2057b26c14d29228d5
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name Removed FilesNo removed files Scenario: legacy-monitoring-values (Added: 0, Modified: 4, Removed: 0)
Summary:
Added FilesNo added files Modified Filesloki/templates/read/deployment-read.yaml*** /home/runner/work/loki/loki/output/base/legacy-monitoring-values/loki/templates/read/deployment-read.yaml 2024-11-29 08:02:23.343602785 +0000
--- /home/runner/work/loki/loki/output/pr/legacy-monitoring-values/loki/templates/read/deployment-read.yaml 2024-11-29 08:02:25.587634278 +0000
***************
*** 27,33 ****
template:
metadata:
annotations:
! checksum/config: e9fb96ccbb6301a58fa706346b03e0fd3574001a1366066686245aa16e5f4f83
labels:
app.kubernetes.io/part-of: memberlist
app.kubernetes.io/name: loki
--- 27,33 ----
template:
metadata:
annotations:
! checksum/config: abacff2ab380333fcb8322e8c3987bee7ab648f9db87be2057b26c14d29228d5
labels:
app.kubernetes.io/part-of: memberlist
app.kubernetes.io/name: loki loki/templates/write/statefulset-write.yaml*** /home/runner/work/loki/loki/output/base/legacy-monitoring-values/loki/templates/write/statefulset-write.yaml 2024-11-29 08:02:23.343602785 +0000
--- /home/runner/work/loki/loki/output/pr/legacy-monitoring-values/loki/templates/write/statefulset-write.yaml 2024-11-29 08:02:25.587634278 +0000
***************
*** 28,34 ****
template:
metadata:
annotations:
! checksum/config: e9fb96ccbb6301a58fa706346b03e0fd3574001a1366066686245aa16e5f4f83
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 28,34 ----
template:
metadata:
annotations:
! checksum/config: abacff2ab380333fcb8322e8c3987bee7ab648f9db87be2057b26c14d29228d5
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/gateway/deployment-gateway-nginx.yaml*** /home/runner/work/loki/loki/output/base/legacy-monitoring-values/loki/templates/gateway/deployment-gateway-nginx.yaml 2024-11-29 08:02:23.343602785 +0000
--- /home/runner/work/loki/loki/output/pr/legacy-monitoring-values/loki/templates/gateway/deployment-gateway-nginx.yaml 2024-11-29 08:02:25.587634278 +0000
***************
*** 24,30 ****
template:
metadata:
annotations:
! checksum/config: 02378006d36e6588fc623cd6ad5b89a61ffd58cc7b0260493d6d1cb2dc70ce13
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 24,30 ----
template:
metadata:
annotations:
! checksum/config: afcb9bfc2815e2b94ccffd596b5dd75cc464bc5c564681571214bccff9c1951a
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name loki/templates/backend/statefulset-backend.yaml*** /home/runner/work/loki/loki/output/base/legacy-monitoring-values/loki/templates/backend/statefulset-backend.yaml 2024-11-29 08:02:23.343602785 +0000
--- /home/runner/work/loki/loki/output/pr/legacy-monitoring-values/loki/templates/backend/statefulset-backend.yaml 2024-11-29 08:02:25.587634278 +0000
***************
*** 32,38 ****
template:
metadata:
annotations:
! checksum/config: e9fb96ccbb6301a58fa706346b03e0fd3574001a1366066686245aa16e5f4f83
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name
--- 32,38 ----
template:
metadata:
annotations:
! checksum/config: abacff2ab380333fcb8322e8c3987bee7ab648f9db87be2057b26c14d29228d5
labels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki-test-chart-name Removed FilesNo removed files Scenario: simple-scalable-aws-kube-irsa-values (Added: 0, Modified: 5, Removed: 0)
Summary:
Added FilesNo added files Modified Filesloki/templates/read/deployment-read.yaml*** /home/runner/work/loki/loki/output/base/simple-scalable-aws-kube-irsa-values/loki/templates/read/deployment-read.yaml 2024-11-29 08:02:23.451604277 +0000
--- /home/runner/work/loki/loki/output/pr/simple-scalable-aws-kube-irsa-values/loki/templates/read/deployment-read.yaml 2024-11-29 08:02:25.695635869 +0000
***************
*** 27,33 ****
template:
metadata:
annotations:
! checksum/config: ab985312bba889f9615f724f7a95edf64604211589668bf268f8781d97deffb1
labels:
app.kubernetes.io/part-of: memberlist
app.kubernetes.io/name: enterprise-logs
--- 27,33 ----
template:
metadata:
annotations:
! checksum/config: 9e97cdc2e6228d40de8987fdd99274829f377a029b929041f4957a9a5d6c116b
labels:
app.kubernetes.io/part-of: memberlist
app.kubernetes.io/name: enterprise-logs loki/templates/write/statefulset-write.yaml*** /home/runner/work/loki/loki/output/base/simple-scalable-aws-kube-irsa-values/loki/templates/write/statefulset-write.yaml 2024-11-29 08:02:23.451604277 +0000
--- /home/runner/work/loki/loki/output/pr/simple-scalable-aws-kube-irsa-values/loki/templates/write/statefulset-write.yaml 2024-11-29 08:02:25.695635869 +0000
***************
*** 28,34 ****
template:
metadata:
annotations:
! checksum/config: ab985312bba889f9615f724f7a95edf64604211589668bf268f8781d97deffb1
labels:
app.kubernetes.io/name: enterprise-logs
app.kubernetes.io/instance: loki-test-chart-name
--- 28,34 ----
template:
metadata:
annotations:
! checksum/config: 9e97cdc2e6228d40de8987fdd99274829f377a029b929041f4957a9a5d6c116b
labels:
app.kubernetes.io/name: enterprise-logs
app.kubernetes.io/instance: loki-test-chart-name loki/templates/gateway/deployment-gateway-enterprise.yaml*** /home/runner/work/loki/loki/output/base/simple-scalable-aws-kube-irsa-values/loki/templates/gateway/deployment-gateway-enterprise.yaml 2024-11-29 08:02:23.451604277 +0000
--- /home/runner/work/loki/loki/output/pr/simple-scalable-aws-kube-irsa-values/loki/templates/gateway/deployment-gateway-enterprise.yaml 2024-11-29 08:02:25.695635869 +0000
***************
*** 27,33 ****
app.kubernetes.io/instance: loki-test-chart-name
app.kubernetes.io/component: gateway
annotations:
! checksum/config: ab985312bba889f9615f724f7a95edf64604211589668bf268f8781d97deffb1
spec:
serviceAccountName: enterprise-logs
securityContext:
--- 27,33 ----
app.kubernetes.io/instance: loki-test-chart-name
app.kubernetes.io/component: gateway
annotations:
! checksum/config: 9e97cdc2e6228d40de8987fdd99274829f377a029b929041f4957a9a5d6c116b
spec:
serviceAccountName: enterprise-logs
securityContext: loki/templates/admin-api/deployment-admin-api.yaml*** /home/runner/work/loki/loki/output/base/simple-scalable-aws-kube-irsa-values/loki/templates/admin-api/deployment-admin-api.yaml 2024-11-29 08:02:23.451604277 +0000
--- /home/runner/work/loki/loki/output/pr/simple-scalable-aws-kube-irsa-values/loki/templates/admin-api/deployment-admin-api.yaml 2024-11-29 08:02:25.695635869 +0000
***************
*** 32,38 ****
target: admin-api
app.kubernetes.io/part-of: memberlist
annotations:
! checksum/config: ab985312bba889f9615f724f7a95edf64604211589668bf268f8781d97deffb1
spec:
serviceAccountName: enterprise-logs
securityContext:
--- 32,38 ----
target: admin-api
app.kubernetes.io/part-of: memberlist
annotations:
! checksum/config: 9e97cdc2e6228d40de8987fdd99274829f377a029b929041f4957a9a5d6c116b
spec:
serviceAccountName: enterprise-logs
securityContext: loki/templates/backend/statefulset-backend.yaml*** /home/runner/work/loki/loki/output/base/simple-scalable-aws-kube-irsa-values/loki/templates/backend/statefulset-backend.yaml 2024-11-29 08:02:23.451604277 +0000
--- /home/runner/work/loki/loki/output/pr/simple-scalable-aws-kube-irsa-values/loki/templates/backend/statefulset-backend.yaml 2024-11-29 08:02:25.695635869 +0000
***************
*** 32,38 ****
template:
metadata:
annotations:
! checksum/config: ab985312bba889f9615f724f7a95edf64604211589668bf268f8781d97deffb1
labels:
app.kubernetes.io/name: enterprise-logs
app.kubernetes.io/instance: loki-test-chart-name
--- 32,38 ----
template:
metadata:
annotations:
! checksum/config: 9e97cdc2e6228d40de8987fdd99274829f377a029b929041f4957a9a5d6c116b
labels:
app.kubernetes.io/name: enterprise-logs
app.kubernetes.io/instance: loki-test-chart-name Removed FilesNo removed files |
What this PR does / why we need it:
Currently, whenever merely the Helm chart version changes, all deployments/statefulsets and their pod templates are updated and restarted, because the sha256 checksum of the whole ConfigMap/Secret is computed, not just based on the
.data
content.And this is because with a new Helm chart version, that version is also encoded in the metadata of the ConfigMap/Secret resource, which however has no influence on the state of the volume mount for the running application/deployment/statefulset pods.
This is an improvement to avoid this and only compute the sh256 checksum based on the
.data
content.Special notes for your reviewer:
Checklist
CONTRIBUTING.md
guide (required)feat
PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.md
deprecated-config.yaml
anddeleted-config.yaml
files respectively in thetools/deprecated-config-checker
directory. Example PR