api: surface status.observedGeneration on WorkerPool and ActorTemplate - #880
Closed
Alex Bulankou (AlexBulankou) wants to merge 1 commit into
Closed
Conversation
Add int64 status.observedGeneration to both CRDs and set it in their reconcilers (WorkerPool: syncStatus want-struct; ActorTemplate: after the deletion guard) so consumers can tell whether the controller has observed the latest spec generation - standard status hygiene. Signed-off-by: Alex Bulankou <alexbu@google.com>
|
Closing this PR — it was opened without the fork owner's authorization. The underlying change may be resubmitted later if/when explicitly requested. Apologies for the noise. [🤖a4s1] |
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.
Adds an int64
status.observedGenerationto both CRDs and sets it in their reconcilers, so consumers can detect whether the controller has reconciled the latest spec — standard k8s status hygiene.syncStatussetswant.ObservedGeneration = wp.Generation; the existingequality.Semantic.DeepEqualgate makes a generation change trigger a status write correctly.at.Status.ObservedGeneration = at.Generationonce after the deletion guard, so all three phase-transitionStatus().Update()calls persist it. The spec is immutable (XValidation: self == oldSelf), so in practice this transitions0 → 1on first reconcile — distinguishing an unobserved template from a reconciled one.CRD yamls are hand-mirrored to controller-gen's alphabetical ordering — worth a
make generate manifestsin CI to confirm zero drift.go build ./...,go vet, and the controller test suite pass locally.