Skip to content

Commit 736e67e

Browse files
committed
update RBAC examples & README with new leader election flags
Signed-off-by: Andrew Sy Kim <[email protected]>
1 parent b3aa2c2 commit 736e67e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Note that the external-provisioner does not scale with more replicas. Only one e
4949

5050
* `--enable-leader-election`: Enables leader election. This is mandatory when there are multiple replicas of the same external-provisioner running for one CSI driver. Only one of them may be active (=leader). A new leader will be re-elected when current leader dies or becomes unresponsive for ~15 seconds.
5151

52+
* `--leader-election-type`: The resource type to use for leader election, options are 'endpoints' (default) or 'leases' (recommended)
53+
5254
* `--timeout <duration>`: Timeout of all calls to CSI driver. It should be set to value that accommodates majority of `ControllerCreateVolume` and `ControllerDeleteVolume` calls. See [CSI error and timeout handling](#csi-error-and-timeout-handling) for details. 15 seconds is used by default.
5355

5456
* `--retry-interval-start <duration>` - Initial retry interval of failed provisioning or deletion. It doubles with each failure, up to `--retry-interval-max` and then it stops increasing. Default value is 1 second. See [CSI error and timeout handling](#csi-error-and-timeout-handling) for details.

deploy/kubernetes/rbac.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,14 @@ metadata:
7676
namespace: default
7777
name: external-provisioner-cfg
7878
rules:
79+
# Only one of the following rules for endpoints or leases is required based on
80+
# what is set for `--leader-election-type`. Endpoints are deprecated in favor of Leases.
7981
- apiGroups: [""]
8082
resources: ["endpoints"]
8183
verbs: ["get", "watch", "list", "delete", "update", "create"]
84+
- apiGroups: ["coordination.k8s.io"]
85+
resources: ["leases"]
86+
verbs: ["get", "watch", "list", "delete", "update", "create"]
8287

8388
---
8489
kind: RoleBinding

0 commit comments

Comments
 (0)