-
Notifications
You must be signed in to change notification settings - Fork 36
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
Delete stale EndpointSlices on restart #1430
Conversation
🤖 Created branch: z_pr1430/tpantelis/stale_eps |
logger.Infof("The service %q for EndpointSlice \"%s/%s\" does not exist - deleting it", | ||
serviceName, endpointSlice.Namespace, endpointSlice.Name) | ||
|
||
err := c.syncer.GetLocalFederator().Delete(ctx, endpointSlice) |
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.
I hope this deletes the EndpointSlice from the Broker as well?
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.
yup - the admiral syncer does that.
test.CreateResource(t.cluster1.localServiceExportClient, serviceExport) | ||
t.cluster1.createService() | ||
|
||
fmt.Println("*******EPS 1: ", resource.ToJSON(localEndpointSlice)) |
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.
fmt.Println("*******EPS 1: ", resource.ToJSON(localEndpointSlice)) |
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.
oops
If a local LH EndpointSlices exists but the corresponding Service doesn't exist, delete the EPS. Also, a headless Service can have multiple EndpointSlices so reconcile the LH EndpointSlices on startup to handle a K8s EndpointSlice deleted while the controller wasn't running. Fixes submariner-io#1416 Signed-off-by: Tom Pantelis <[email protected]>
🤖 Closed branches: [z_pr1430/tpantelis/stale_eps] |
Release notes for submariner-io/lighthouse#1430 Signed-off-by: Tom Pantelis <[email protected]>
Release notes for submariner-io/lighthouse#1430 Signed-off-by: Tom Pantelis <[email protected]>
Release notes for submariner-io/lighthouse#1430 Signed-off-by: Tom Pantelis <[email protected]>
Release notes for submariner-io/lighthouse#1430 Signed-off-by: Tom Pantelis <[email protected]>
Release notes for submariner-io/lighthouse#1430 Signed-off-by: Tom Pantelis <[email protected]>
Release notes for submariner-io/lighthouse#1430 Signed-off-by: Tom Pantelis <[email protected]>
If a local LH
EndpointSlices
exists but the correspondingService
doesn't exist, delete theEndpointSlice
.Also, a headless
Service
can have multipleEndpointSlices
so reconcile the LHEndpointSlices
on startup to handle a K8sEndpointSlice
deleted while the controller wasn't running.Fixes #1416