-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📖 clarify comments of GenerationChangedPredicate #3002
📖 clarify comments of GenerationChangedPredicate #3002
Conversation
Welcome @loveRhythm1990! |
Hi @loveRhythm1990. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
5bacd9a
to
03f65a9
Compare
@joelanford ,plz help look at this |
pkg/predicate/predicate.go
Outdated
@@ -191,7 +191,7 @@ type GenerationChangedPredicate = TypedGenerationChangedPredicate[client.Object] | |||
// The metadata.generation field of an object is incremented by the API server when writes are made to the spec field of an object. | |||
// This allows a controller to ignore update events where the spec is unchanged, and only the metadata and/or status fields are changed. | |||
// | |||
// For CustomResource objects the Generation is only incremented when the status subresource is enabled. | |||
// For CustomResource objects the Generation is only incremented when the status subresource is not enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This now sounds like the generation is not incremented at all as soon as the status sub resource is enabled
(also wasn't great before)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about For CustomResource objects the Generation is incremented when spec is changed, or status changed and status not modeled as subresource. subresource status update will not increase Generation.
? I put it in second commit.
Thx! /lgtm |
LGTM label has been added. Git tree hash: 303de15f54f57a12ef8dc2060f961d69159399b1
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: loveRhythm1990, sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
comments of GenerationChangedPredicate is confusing, we know that
generation
is not updated if its status is defined as subresource.