Skip to content

add --add-checksum-annotations flag for rolling restarts on config changes#194

Open
robertaistleitner wants to merge 3 commits intoarttor:mainfrom
robertaistleitner:168-checksum-annotations
Open

add --add-checksum-annotations flag for rolling restarts on config changes#194
robertaistleitner wants to merge 3 commits intoarttor:mainfrom
robertaistleitner:168-checksum-annotations

Conversation

@robertaistleitner
Copy link
Copy Markdown

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.

Robert Aistleitner 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant