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

Make leader-election flag consistent with other sidecar #402

Merged
merged 1 commit into from
Apr 15, 2020

Conversation

Madhu-1
Copy link
Contributor

@Madhu-1 Madhu-1 commented Feb 5, 2020

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:
This PR removes the --enable-leader-election and leader-election-type flag and add leader-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?:

ACTION REQUIRED: This introduces a new flag `leader-election` which is the same as in other sidecar containers and also removes the `enable-leader-election` and `leader-election-type` flag

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 5, 2020
@k8s-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 5, 2020
@Madhu-1
Copy link
Contributor Author

Madhu-1 commented Feb 5, 2020

/assign @msau42
/assign @jsafrane

@jsafrane
Copy link
Contributor

jsafrane commented Feb 5, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 5, 2020
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.")
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jsafrane yes I can do that, will wait for @msau42 response

Copy link
Collaborator

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

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

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

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.
@Madhu-1
Copy link
Contributor Author

Madhu-1 commented Apr 3, 2020

@msau42 changes done PTAL

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 3, 2020
@msau42
Copy link
Collaborator

msau42 commented Apr 3, 2020

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 3, 2020
@k8s-ci-robot
Copy link
Contributor

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 3, 2020
@msau42
Copy link
Collaborator

msau42 commented Apr 10, 2020

@Madhu-1 seems like the travis pr job is stuck. Can you try pushing a change to see if that helps the job restart?

@msau42 msau42 added this to In progress in K8s 1.19 Apr 10, 2020
@msau42
Copy link
Collaborator

msau42 commented Apr 15, 2020

Travis pull jobs have been disabled on this repo now. Force merging.

@msau42 msau42 merged commit aa1ce81 into kubernetes-csi:master Apr 15, 2020
K8s 1.19 automation moved this from In progress to Done Apr 15, 2020
@k8s-ci-robot k8s-ci-robot added release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jul 31, 2020
kbsonlong pushed a commit to kbsonlong/external-provisioner that referenced this pull request Dec 29, 2023
…go_modules/google.golang.org/grpc-1.52.0

Bump google.golang.org/grpc from 1.51.0 to 1.52.0
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
No open projects
K8s 1.19
  
Done
Development

Successfully merging this pull request may close these issues.

Arg "--enable-leader-election" is not consistent with other sidecars
4 participants