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

improv: check for k8s backing before running sync #27269

Conversation

kwakubiney
Copy link
Member

This change ensures that the synchronisation controller does not run at all when the endpoint has no CEP name, which implies that it also has no pod backing.

Fixes: #27128

@kwakubiney kwakubiney requested a review from a team as a code owner August 4, 2023 07:48
@kwakubiney kwakubiney requested a review from squeed August 4, 2023 07:48
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Aug 4, 2023
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label Aug 4, 2023
@kwakubiney kwakubiney force-pushed the improv/ignore-synctok8scontroller-for-some-endpoints branch from ce12572 to 3c4803e Compare August 4, 2023 07:56
@dylandreimerink dylandreimerink added kind/bug This is a bug in the Cilium logic. release-note/bug This PR fixes an issue in a previous release of Cilium. labels Aug 4, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Aug 4, 2023
@dylandreimerink
Copy link
Member

/test

@dylandreimerink dylandreimerink added kind/cleanup This includes no functional changes. release-note/misc This PR makes changes that have no direct user impact. and removed kind/bug This is a bug in the Cilium logic. release-note/bug This PR fixes an issue in a previous release of Cilium. labels Aug 4, 2023
Signed-off-by: kwakubiney <kebiney@hotmail.com>
@kwakubiney kwakubiney force-pushed the improv/ignore-synctok8scontroller-for-some-endpoints branch from 3c4803e to 90f5fc8 Compare August 6, 2023 10:37
@kwakubiney
Copy link
Member Author

/test

@@ -95,14 +103,6 @@ func (epSync *EndpointSynchronizer) RunK8sCiliumEndpointSync(e *endpoint.Endpoin
return fmt.Errorf("Kubernetes apiserver is not available")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this condition (k8s connectivity) change as well, or can we also hoist it out of the controller?

Copy link
Member Author

@kwakubiney kwakubiney Aug 7, 2023

Choose a reason for hiding this comment

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

I'd look at it but looks like PR has been merged?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hah! Nevermind :-)

Copy link
Contributor

@squeed squeed left a comment

Choose a reason for hiding this comment

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

Looks good, just one possible small improvement. Thanks!

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Aug 7, 2023
@ldelossa ldelossa merged commit 5854e7c into cilium:main Aug 7, 2023
58 of 59 checks passed
@kwakubiney kwakubiney deleted the improv/ignore-synctok8scontroller-for-some-endpoints branch August 7, 2023 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup This includes no functional changes. kind/community-contribution This was a contribution made by a community member. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cleanup: Don't run sync-to-k8s-ciliumendpoint for endpoints which don't need it
4 participants