-
Notifications
You must be signed in to change notification settings - Fork 35
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
Update to controller-runtime 0.5.0 #161
Update to controller-runtime 0.5.0 #161
Conversation
* And K8S 1.17 libraries
This has now been fixed upstream.
@@ -58,6 +61,7 @@ func main() { | |||
Scheme: scheme, | |||
MetricsBindAddress: metricsAddr, | |||
LeaderElection: enableLeaderElection, | |||
LeaderElectionID: leaderElectionID, |
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.
You can see the effect of this in the controller logs:
2020-02-14T10:50:24.031Z INFO setup starting manager
I0214 10:50:24.031598 1 leaderelection.go:242] attempting to acquire leader lease eco-system/etcd-cluster-operator-controller...
2020-02-14T10:50:24.031Z INFO controller-runtime.manager starting metrics server {"path": "/metrics"}
I0214 10:50:24.039249 1 leaderelection.go:252] successfully acquired lease eco-system/etcd-cluster-operator-controller
2020-02-14T10:50:24.039Z DEBUG controller-runtime.manager.events Normal {"object": {"kind":"ConfigMap","namespace":"eco-system","name":"etcd-cluster-operator-controller","uid":"d989e918-ff9c-482a-85dd-66cb544cec58","apiVersion":"v1","resourceVersion":"788"}, "reason": "LeaderElection", "message": "eco-controller-manager-798b645f4c-tdc7f_3053e6bf-faf3-4a60-931f-6b631e56d797 became leader"}
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.
Vs
020-02-13T14:32:06.498Z DEBUG controller-runtime.manager.events Normal {"object": {"kind":"ConfigMap","namespace":"eco-system","name":"controller-leader-election-helper","uid":"1ce476d2-1d45-4ff7-94d0-5fa875e6b8c6","apiVersion":"v1","resourceVersion":"770"}, "reason": "LeaderElection", "message": "eco-controller-manager-798b645f4c-rbj65_422dbcf3-1f0b-4453-b74c-ae0a2af3cf05 became leader"}
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've added -leader-election-helper
back in to the name, to make it clear what the configmap is used for
See https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.5.0