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

Provide better defaults for external-snapshotter #459

Merged
merged 1 commit into from
Jan 29, 2021

Conversation

kvaps
Copy link
Contributor

@kvaps kvaps commented Dec 24, 2020

What type of PR is this?

/kind feature

What this PR does / why we need it:

Provided manifests for external-snapshotter are not optimal in most use-cases.

Since external-snapshotter is most common component among various Kubernetes distributions and csi-plugins, I think we need to correct the manifests and include the following changes. They are needed to simplify the setup and provide optimal defaults for every user.

  • Deploy external-snapshotter into kube-system namespace by default
  • Enable leader-election
  • Use Deployment instead of Statefulset and deploy minimum 2 replicas for redundancy

The following changes would allow to simple install working external-snapshotter using just few commands, as described here:
https://kubernetes-csi.github.io/docs/snapshot-controller.html#deployment

but without having to manually edit manifests

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

external-snapshotter manifests adjusted to reflect more common example

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 24, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @kvaps!

It looks like this is your first PR to kubernetes-csi/external-snapshotter 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-csi/external-snapshotter has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @kvaps. 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 24, 2020
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 24, 2020
@kvaps kvaps force-pushed the common-example branch 3 times, most recently from ed88539 to 2db4645 Compare December 24, 2020 01:07
@kvaps
Copy link
Contributor Author

kvaps commented Dec 24, 2020

/assign @jingxu97

@xing-yang
Copy link
Collaborator

/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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 24, 2020
@kvaps
Copy link
Contributor Author

kvaps commented Dec 24, 2020

/retest

@kvaps kvaps force-pushed the common-example branch 3 times, most recently from e33a43f to cc157ce Compare December 24, 2020 17:31
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 24, 2020
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 24, 2020
@kvaps
Copy link
Contributor Author

kvaps commented Dec 24, 2020

/retest

@@ -9,13 +9,12 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: snapshot-controller
namespace: default # TODO: replace with the namespace you want for your controller, e.g. kube-system
namespace: kube-system
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is used in CI so I'd like to ask Patrick to take a look.
@pohly Do you have any concerns for this namespace to be changed from "default" to "kube-system"?

Copy link
Contributor

Choose a reason for hiding this comment

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

No objections.

Just beware that it might be necessary to change prow.sh so that it works with a rbac-snapshot-controller.yaml that has namespace: default (current stable release) and a newer rbac-snapshot-controller.yaml that has namespace: kube-system (canary) because the same prow.sh file is used with both, depending on the test job.

if [ $cnt -gt 30 ]; then
echo "snapshot-controller pod status:"
kubectl describe pods -l app=snapshot-controller
kubectl describe pods -n "$expected_namespace" -l app=snapshot-controller
Copy link
Collaborator

Choose a reason for hiding this comment

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

prow.sh should be changed in csi-release-tools first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, It has been changed already, PR kubernetes-csi/csi-release-tools#121

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 19, 2021
@kvaps kvaps force-pushed the common-example branch 3 times, most recently from f6a1b62 to 778e3c0 Compare January 25, 2021 23:15
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 25, 2021
@xing-yang
Copy link
Collaborator

xing-yang commented Jan 26, 2021

The release-tools change is already included in this PR: #464. Can you remove those changes from your PR and rebase?

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 27, 2021
@kvaps
Copy link
Contributor Author

kvaps commented Jan 27, 2021

Sure, rebased

@xing-yang
Copy link
Collaborator

/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 Jan 29, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kvaps, xing-yang

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 Jan 29, 2021
@k8s-ci-robot k8s-ci-robot merged commit 165f6e0 into kubernetes-csi:master Jan 29, 2021
@kvaps
Copy link
Contributor Author

kvaps commented Feb 15, 2021

Hi. Is it possible to create release with this change?

@xing-yang
Copy link
Collaborator

This affects multiple sidecars because we have to make changes in release-tools. I don't think this is a bug fix that can be backported. The yaml files are provided as examples. User can modify their own yamls if needed. Our usual release timeline aligns with the next k8s release.

@kvaps
Copy link
Contributor Author

kvaps commented Feb 17, 2021

Got it! Thank you

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. kind/feature Categorizes issue or PR as related to a new feature. 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 Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants