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

feat: Implemented leaderelection.LeaseHijacker #99

Merged
merged 1 commit into from
Nov 14, 2024
Merged

feat: Implemented leaderelection.LeaseHijacker #99

merged 1 commit into from
Nov 14, 2024

Conversation

ellistarn
Copy link
Contributor

@ellistarn ellistarn commented Nov 14, 2024

Issue #, if available:

Description of changes:
Enables support for developers to steal leases from a running controller.

LeaderElectionResourceLockInterface: leaderelection.LeaseHijacker(ctx, controllerruntime.GetConfigOrDie(), "kube-system", name),
rnal.go:512     error received after stop sequence was engaged      {"error": "leader election lost"}
sigs.k8s.io/controller-runtime/pkg/manager.(*controllerManager).engageStopProcedure.func1
        /home/etarn/workspaces//tmp/gomodcache/sigs.k8s.io/[email protected]/pkg/manager/internal.go:512
2024-11-14T22:44:59.137Z        INFO    leaderelection/leasehijacker.go:24  hijacking lease {"namespace": "kube-system", "name": "controller"}
2024-11-14T22:45:01.067Z        INFO    controller-runtime.metrics  server/server.go:208    Starting metrics server
2024-11-14T22:45:01.067Z        INFO    manager/server.go:83        starting server {"name": "health probe", "addr": "[::]:8081"}
2024-11-14T22:45:01.068Z        INFO    controller-runtime.metrics  server/server.go:247    Serving metrics server      {"bindAddress": ":8080", "secure": false}
2024-11-14T22:45:01.170Z        INFO    leaderelection/leaderelection.go:254        attempting to acquire leader lease kube-system/controller...
2024-11-14T22:45:01.185Z        INFO    leaderelection/leaderelection.go:268        successfully acquired lease kube-system/controller

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ellistarn ellistarn requested a review from a team as a code owner November 14, 2024 22:40
Copy link
Contributor

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@ellistarn ellistarn merged commit bcfec8f into main Nov 14, 2024
1 check passed
@ellistarn ellistarn deleted the lease branch November 14, 2024 22:50
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.

2 participants