Conversation
Sizes the design discussed for detecting drift caused by Helm's lookup function: a live re-render digest compared against the digest of the last real release, reusing the existing OutOfSync path instead of a new diffing mechanism. Tests intentionally omitted, this is only meant to gauge the size of the change. Signed-off-by: Chris Werner Rau <cwrau@cwrau.info> Assisted-by: Claude Code/claude-sonnet-5
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.
Not a fix, not meant to be merged. Just poking at the size of the idea from #1583, since the "mountain of complexity" pushback deserved a sanity check.
What this does
Adds an opt-in
driftDetection.mode: enabledWithRender. When set, every reconciliation does ahelm upgrade --dry-run=serverre-render (solookupevaluates against live cluster state, same as a real upgrade would), hashes the resulting manifest, and compares it against a newstatus.observedTemplateDigest. A mismatch routes into the existingOutOfSyncstate, so correction goes through a normalAtomicReleaseupgrade, nothing new there.What's deliberately left out
make generate manifests api-docs— didn't regen CRDs/docs, a single string field doesn't need it to compile, but a real PR would need it committed.etcd/kube-apiserverbinaries handy locally, so this is "it builds and vets clean," not "verified end-to-end against a real API server."Diff
5 files, ~114 lines. Core mechanism is one new function (
RenderTemplateDigest) plus wiring into the existing digest-comparison block instate.go.Marked
PROOF OF CONCEPTin the code itself, happy to close this out once it's served its purpose.🤖 Generated with Claude Code