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

Use leader election library from csi-lib-utils #261

Merged
merged 3 commits into from
Apr 3, 2019

Conversation

andrewsykim
Copy link
Contributor

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

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 29, 2019
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 29, 2019
@andrewsykim
Copy link
Contributor Author

/hold

Waiting for kubernetes-csi/csi-lib-utils#24

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 1, 2019
@pohly
Copy link
Contributor

pohly commented Apr 2, 2019

How does this affect RBAC rules?

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 2, 2019
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.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add deprecation notice here

Copy link
Contributor Author

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)
Copy link
Collaborator

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"]
Copy link
Collaborator

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

@msau42
Copy link
Collaborator

msau42 commented Apr 3, 2019

/lgtm
/approve
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 3, 2019
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 3, 2019
@k8s-ci-robot k8s-ci-robot merged commit f338883 into kubernetes-csi:master Apr 3, 2019
kbsonlong pushed a commit to kbsonlong/external-provisioner that referenced this pull request Dec 29, 2023
avorima added a commit to avorima/external-provisioner that referenced this pull request Dec 5, 2024
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]>
TerryHowe added a commit to TerryHowe/external-provisioner that referenced this pull request Dec 9, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants