-
Notifications
You must be signed in to change notification settings - Fork 140
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
Postpone policy recommendation scope watches until apiserver is up an… #2713
Conversation
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.
lgtm
@@ -65,6 +65,7 @@ func Add(mgr manager.Manager, opts options.AddOptions) error { | |||
} | |||
licenseAPIReady := &utils.ReadyFlag{} | |||
tierWatchReady := &utils.ReadyFlag{} | |||
policyRecScopeWatchReady := &utils.ReadyFlag{} |
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.
It seems like we should check this ready flag (like we do with the license and tier ones) before fetching the PolicyRecommendationScopes in the Reconcile.
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.
Yep, that's an important part of this - prevents us sending unnecessary requests to the apiserver and ensures we're using our cache to satisfy client queries.
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.
Done, thank you.
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.
LGTM
* Postpone policy recommendation scope watches until apiserver is up and running * Block the policy recommendation controller if the apiserver watch is not established yet * Mark readyFlag in unit tests.
Affects: EV-3878 EV-3861