-
Notifications
You must be signed in to change notification settings - Fork 337
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
Use leader election library from csi-lib-utils #261
Use leader election library from csi-lib-utils #261
Conversation
/hold Waiting for kubernetes-csi/csi-lib-utils#24 |
How does this affect RBAC rules? |
8e86a44
to
95e7d7e
Compare
95e7d7e
to
92de551
Compare
retryIntervalStart = flag.Duration("retry-interval-start", time.Second, "Initial retry interval of failed provisioning or deletion. It doubles with each failure, up to retry-interval-max.") | ||
retryIntervalMax = flag.Duration("retry-interval-max", 5*time.Minute, "Maximum retry interval of failed provisioning or deletion.") | ||
workerThreads = flag.Uint("worker-threads", 100, "Number of provisioner worker threads, in other words nr. of simultaneous CSI calls.") | ||
operationTimeout = flag.Duration("timeout", 10*time.Second, "Timeout for waiting for creation or deletion of a volume") | ||
_ = deprecatedflags.Add("provisioner") | ||
|
||
enableLeaderElection = flag.Bool("enable-leader-election", false, "Enables leader election. If leader election is enabled, additional RBAC rules are required. Please refer to the Kubernetes CSI documentation for instructions on setting up these RBAC rules.") |
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.
Add deprecation notice here
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.
Did you mean for leaderElectionType
?
|
||
var le leaderElection | ||
if *leaderElectionType == "endpoints" { | ||
le = leaderelection.NewLeaderElectionWithEndpoints(clientset, lockName, run) |
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.
And deprecation log message here
@@ -79,6 +79,9 @@ rules: | |||
- apiGroups: [""] | |||
resources: ["endpoints"] | |||
verbs: ["get", "watch", "list", "delete", "update", "create"] | |||
- apiGroups: ["coordination.k8s.io"] |
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.
And a comment that only one of endpoints or lease rules is needed
Signed-off-by: Andrew Sy Kim <[email protected]>
…ed leader election Signed-off-by: Andrew Sy Kim <[email protected]>
Signed-off-by: Andrew Sy Kim <[email protected]>
92de551
to
736e67e
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewsykim, msau42 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fix the failing multiarch builds
Commit summary: Squashed 'release-tools/' changes from 227577e00..734c2b950 [734c2b950](kubernetes-csi/csi-release-tools@734c2b950) Merge [pull request kubernetes-csi#265](kubernetes-csi/csi-release-tools#265) from Rakshith-R/consider-main-branch [f95c855be](kubernetes-csi/csi-release-tools@f95c855be) Merge [pull request kubernetes-csi#262](kubernetes-csi/csi-release-tools#262) from huww98/golang-toolchain [3c8d966fe](kubernetes-csi/csi-release-tools@3c8d966fe) Treat main branch as equivalent to master branch [e31de525b](kubernetes-csi/csi-release-tools@e31de525b) Merge [pull request kubernetes-csi#261](kubernetes-csi/csi-release-tools#261) from huww98/golang [fd153a9e2](kubernetes-csi/csi-release-tools@fd153a9e2) Bump golang to 1.23.1 [a8b3d0504](kubernetes-csi/csi-release-tools@a8b3d0504) pull-test.sh: fix "git subtree pull" errors [6b05f0fcc](kubernetes-csi/csi-release-tools@6b05f0fcc) use new GOTOOLCHAIN env to manage go version git-subtree-dir: release-tools git-subtree-split: 734c2b950c4b31f64b63052c64ffa5929d1c9b97 Signed-off-by: Mario Valderrama <[email protected]>
98f23071d Merge pull request kubernetes-csi#260 from TerryHowe/update-csi-driver-version e9d8712d0 Merge pull request kubernetes-csi#259 from stmcginnis/deprecated-kind-kube-root faf79ff66 Remove --kube-root deprecated kind argument 734c2b950 Merge pull request kubernetes-csi#265 from Rakshith-R/consider-main-branch f95c855be Merge pull request kubernetes-csi#262 from huww98/golang-toolchain 3c8d966fe Treat main branch as equivalent to master branch e31de525b Merge pull request kubernetes-csi#261 from huww98/golang fd153a9e2 Bump golang to 1.23.1 a8b3d0504 pull-test.sh: fix "git subtree pull" errors 6b05f0fcc use new GOTOOLCHAIN env to manage go version 18b6ac6d2 chore: update CSI driver version to 1.15 git-subtree-dir: release-tools git-subtree-split: 98f23071d946dd3de3188a7e1f84679067003162
Also adds support for lease based leader election which is highly recommended over endpoints base. Endpoints based will be supported for a few releases for backwards compatibility.
/assign @msau42 @jsafrane @xing-yang