Skip to content

Commit

Permalink
chore(operator): add lease in clusterRole to enable leader-election A…
Browse files Browse the repository at this point in the history
…PI's (openebs#2759)

Signed-off-by: prateekpandey14 <prateek.pandey@openebs.io>
  • Loading branch information
prateekpandey14 authored and vishnuitta committed Oct 4, 2019
1 parent ba52413 commit 87bf771
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions k8s/charts/openebs/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ rules:
- apiGroups: ["*"]
resources: [ "upgradetasks"]
verbs: ["*" ]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "watch", "list", "delete", "update", "create"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
{{- end }}
3 changes: 3 additions & 0 deletions k8s/openebs-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ rules:
- apiGroups: ["*"]
resources: [ "cstorbackups", "cstorrestores", "cstorcompletedbackups"]
verbs: ["*" ]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "watch", "list", "delete", "update", "create"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
- apiGroups: ["*"]
Expand Down

0 comments on commit 87bf771

Please sign in to comment.