-
Notifications
You must be signed in to change notification settings - Fork 350
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
Make leader-election flag consistent with other sidecar #402
Conversation
Hi @Madhu-1. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
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.") | ||
_ = deprecatedflags.Add("enable-leader-election") | ||
|
||
enableLeaderElection = flag.Bool("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.
This is a breaking change that requires bump to v2.0.
@msau42, can we expect that the next release will be 2.0?
@Madhu-1, depending on the answer to above question, would it be possible to support both enable-leader-election
and leader-election
at the same time until we're ready for v2.0? It's OK to throw error if both are specified.
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.
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.
I just released a 1.6, and mentioned this in the deprecation notes. We can proceed and just break it.
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.") | ||
_ = deprecatedflags.Add("enable-leader-election") | ||
|
||
enableLeaderElection = flag.Bool("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.
I just released a 1.6, and mentioned this in the deprecation notes. We can proceed and just break it.
@@ -64,7 +64,10 @@ var ( | |||
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.") | |||
_ = deprecatedflags.Add("enable-leader-election") |
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.
I think we can just remove the old arg.
_ = deprecatedflags.Add("enable-leader-election") | ||
|
||
enableLeaderElection = flag.Bool("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.") | ||
|
||
leaderElectionType = flag.String("leader-election-type", "endpoints", "the type of leader election, options are 'endpoints' (default) or 'leases' (strongly recommended). The 'endpoints' option is deprecated in favor of 'leases'.") |
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 remove the "type" arg. We will only support leases going forward.
This PR removes the `--enable-leader-election` flag and add `leader-election` flag as other sidecar containers.
@msau42 changes done PTAL |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Madhu-1, 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 |
@Madhu-1 seems like the travis pr job is stuck. Can you try pushing a change to see if that helps the job restart? |
Travis pull jobs have been disabled on this repo now. Force merging. |
…go_modules/google.golang.org/grpc-1.52.0 Bump google.golang.org/grpc from 1.51.0 to 1.52.0
What type of PR is this?
What this PR does / why we need it:
This PR removes the
--enable-leader-election
andleader-election-type
flag and addleader-election
flag as other sidecar containers.Which issue(s) this PR fixes:
Fixes #401
Special notes for your reviewer:
Does this PR introduce a user-facing change?: