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

Added permissions for leader election #1635 #1647

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

ordukhanian
Copy link
Contributor

Added new RBAC permissions needed by default for leader election for the coordination/v1 API.
Required after upgrade to golang:1.19.2.
In k8s.io/client-go@v0.25.3/tools/leaderelection/resourcelock/interface.go:166 configMapsResourceLock was removed and should be replaced by ConfigMapsLeasesResourceLock.

#1635

Added new RBAC permissions needed by default for leader election for the coordination/v1 API.
Required after upgrade to golang:1.19.2.
In k8s.io/client-go@v0.25.3/tools/leaderelection/resourcelock/interface.go:166 `configMapsResourceLock` was removed and should be replaced by `ConfigMapsLeasesResourceLock`.
@sairamankumar2
Copy link
Contributor

sairamankumar2 commented Dec 8, 2022

We are facing the following error and this PR will help resolve it.

error retrieving resource lock spark-operator/spark-operator-lock: leases.coordination.k8s.io "spark-operator-lock" is forbidden: User "system:serviceaccount:spark-operator:spark-operator" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "spark-operator"

@sairamankumar2
Copy link
Contributor

@liyinan926 Can you kindly review this PR?

@pdrastil
Copy link
Contributor

This is duplicate of #1645. Does this work without granting full access to CMs? From leader election I've seen this typically required more than just create / get / update / delete as K8s controller is also watching for changes in this resources.

Copy link
Collaborator

@liyinan926 liyinan926 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@liyinan926 liyinan926 merged commit bd2eda2 into kubeflow:master Mar 17, 2023
ImpSy pushed a commit to spotinst/spark-on-k8s-operator that referenced this pull request Jul 27, 2023
Added new RBAC permissions needed by default for leader election for the coordination/v1 API.
Required after upgrade to golang:1.19.2.
In k8s.io/client-go@v0.25.3/tools/leaderelection/resourcelock/interface.go:166 `configMapsResourceLock` was removed and should be replaced by `ConfigMapsLeasesResourceLock`.
ImpSy pushed a commit to spotinst/spark-on-k8s-operator that referenced this pull request Jul 31, 2023
Added new RBAC permissions needed by default for leader election for the coordination/v1 API.
Required after upgrade to golang:1.19.2.
In k8s.io/client-go@v0.25.3/tools/leaderelection/resourcelock/interface.go:166 `configMapsResourceLock` was removed and should be replaced by `ConfigMapsLeasesResourceLock`.
jbhalodia-slack pushed a commit to jbhalodia-slack/spark-operator that referenced this pull request Oct 4, 2024
Added new RBAC permissions needed by default for leader election for the coordination/v1 API.
Required after upgrade to golang:1.19.2.
In k8s.io/client-go@v0.25.3/tools/leaderelection/resourcelock/interface.go:166 `configMapsResourceLock` was removed and should be replaced by `ConfigMapsLeasesResourceLock`.
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.

4 participants