Skip to content
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

cr-syncer: Preserve observedGeneration semantics #124

Merged
merged 2 commits into from
Mar 29, 2023
Merged

Conversation

drigz
Copy link
Contributor

@drigz drigz commented Mar 29, 2023

The status's observedGeneration field lets a CR creator identify when a controller has updated the status to reflect a change in the spec. However, because it's tied to the generation field, which is managed by the apiserver, it can't be directly copied between two clusters. Instead, we can preserve the difference between generation and observedGeneration, allowing the CR creator to wait until generation==observedGeneration before looking at the status.

I also needed to bump to Go 1.18 to use any.

The status's observedGeneration field lets a CR creator identify when a
controller has updated the status to reflect a change in the spec.
However, because it's tied to the generation field, which is managed by
the apiserver, it can't be directly copied between two clusters.
Instead, we can preserve the difference between generation and
observedGeneration, allowing the CR creator to wait until
generation==observedGeneration before looking at the status.
@drigz
Copy link
Contributor Author

drigz commented Mar 29, 2023

PTAL

Copy link
Contributor

@faximan faximan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@drigz drigz merged commit c4d42a2 into main Mar 29, 2023
@drigz drigz deleted the cr-syncer-generation branch March 29, 2023 12:23
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.

None yet

2 participants