add --add-checksum-annotations flag for rolling restarts on config changes#194
Open
robertaistleitner wants to merge 3 commits intoarttor:mainfrom
Open
add --add-checksum-annotations flag for rolling restarts on config changes#194robertaistleitner wants to merge 3 commits intoarttor:mainfrom
robertaistleitner wants to merge 3 commits intoarttor:mainfrom
Conversation
added 3 commits
April 5, 2026 21:15
…anges Implements arttor#168: opt-in flag that adds sha256sum checksum annotations to pod templates for referenced ConfigMaps and Secrets. Annotations are injected during the output phase using actual resolved template filenames, so paths are correct regardless of single-file or multi-file input. Covers Deployments, DaemonSets, and StatefulSets with detection across envFrom, env valueFrom, volumes, and projected volumes.
Move PodSpec extraction and GVK constants into checksum.go, eliminating duplicate definitions from context.go. Replace three parallel slices with a processedTemplate struct. Fix spec: parent lookback scanning past intervening lines (selector, replicas, etc.) by searching until a lower-indent line is found instead of a fixed 3-line window.
…rocessing Replace the injectAnnotations string manipulation with direct annotation generation inside each processor. ChecksumAnnotations now returns pre-formatted YAML lines that processors append to their podAnnotations string (Deployment, DaemonSet) or splice into the marshaled spec (StatefulSet). Filename maps are pre-computed in context.go and passed through AppMetadata, so processors have everything they need. Removes checksumTemplate wrapper, injectAnnotations, and extractPodSpec from context.go.
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.
Implements #168.
Adds opt-in flag that adds sha256sum checksum annotations to pod templates for referenced ConfigMaps and Secrets. Annotations are injected during the output phase using actual resolved template filenames, so paths are correct regardless of single-file or multi-file input. Covers Deployments, DaemonSets, and StatefulSets with detection across envFrom, env valueFrom, volumes, and projected volumes.