Skip to content

Commit

Permalink
Merge pull request #63 from metal-stack/rbac-for-leases
Browse files Browse the repository at this point in the history
Add necessary permission for leader election with Leases
  • Loading branch information
robertvolkmann authored Mar 20, 2024
2 parents 1c4fea2 + e4fe2cf commit 5b27ea0
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions deploy/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,34 @@ subjects:
name: csi-lvm-controller
namespace: csi-lvm
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: csi-lvm-controller
namespace: csi-lvm
rules:
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
resourceNames: ["metal-stack.io-csi-lvm"]
verbs: ["get", "update", "patch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: csi-lvm-controller
namespace: csi-lvm
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: csi-lvm-controller
subjects:
- kind: ServiceAccount
name: csi-lvm-controller
namespace: csi-lvm
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down

0 comments on commit 5b27ea0

Please sign in to comment.