K8s: Hash only the config data in checksum/* pod annotations - #3237
Open
DrFaust92 wants to merge 1 commit into
Open
K8s: Hash only the config data in checksum/* pod annotations#3237DrFaust92 wants to merge 1 commit into
DrFaust92 wants to merge 1 commit into
Conversation
The checksum/* annotations hashed the entire rendered ConfigMap or Secret, whose metadata.labels include the chart labels. Those change on every chart version bump, so every Grid component was restarted on upgrade even when no configuration had changed. Add a seleniumGrid.configMapOrSecretContentHash helper that hashes only the data and stringData sections, and use it for all 31 checksum/* annotations. Signed-off-by: Ilia Lazebnik <ilia.lazebnik@gmail.com>
Contributor
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a
seleniumGrid.configMapOrSecretContentHashhelper that hashes only thedata/stringDataof a rendered ConfigMap or Secret, and switches all 31checksum/*pod annotations to it — hub, router, distributor, session-map, session-queue, event-bus and the node pod template.Motivation and Context
The annotations hashed the whole rendered manifest, and
metadata.labelscarry the chart labels, which change on every chart version bump. Every component pod therefore restarted onhelm upgradeeven when no configuration had changed — for the nodes that means dropping live sessions for nothing.After this change a chart-version-only upgrade leaves the checksums untouched, while a real config change (for example
global.seleniumGrid.logLevel) still changes them and restarts the pods. Upgrading to the release containing this change restarts the pods once, as the annotation values change.The same fix was recently made in the argo-cd chart (argoproj/argo-helm#4044), and the loki chart uses the same data-only hashing.
Types of changes
Checklist