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

Add vSphere external cloud provider #5861

Closed
wants to merge 4 commits into from
Closed

Add vSphere external cloud provider #5861

wants to merge 4 commits into from

Conversation

pierreyves-lebrun
Copy link
Contributor

@pierreyves-lebrun pierreyves-lebrun commented Mar 31, 2020

What type of PR is this?
/kind feature

What this PR does / why we need it:
Implement external vSphere cloud provider as per #5309.
The in-tree vSphere cloud provider has been deprecated so the out-of-tree one should now be used.

Tested on vSphere 6.7 U3.

Special notes for your reviewer:
In order to keep both working, I added new vSphere configuration variables which are the same as the old ones but prefixed with external_

Does this PR introduce a user-facing change?:
Users should use the new external vSphere cloud provider rather than the old in-tree one.

Special thanks to @alijahnas as this PR is based on his previous work.

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 31, 2020
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Mar 31, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @pierreyves-lebrun!

It looks like this is your first PR to kubernetes-sigs/kubespray 🎉. 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-sigs/kubespray 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 @pierreyves-lebrun. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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 Mar 31, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pierreyves-lebrun
To complete the pull request process, please assign ant31
You can assign the PR to them by writing /assign @ant31 in a comment when ready.

The full list of commands accepted by this bot can be found 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 requested review from bozzo and holmsten March 31, 2020 08:25
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 31, 2020
@pierreyves-lebrun
Copy link
Contributor Author

pierreyves-lebrun commented Mar 31, 2020

/assign @ant31
/assign @alijahnas

@pierreyves-lebrun
Copy link
Contributor Author

Signed the CLA

@Miouge1
Copy link
Contributor

Miouge1 commented Mar 31, 2020

/check-cla

@Miouge1
Copy link
Contributor

Miouge1 commented Mar 31, 2020

Thank you for your contribution, there are a couple of CI errors to resolve:

Moreover it looks like your GitHub user is not associated with the commit email address which makes the CLA bot complain.

Copy link
Contributor

@alijahnas alijahnas left a comment

Choose a reason for hiding this comment

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

Hi @pierreyves-lebrun Thanks for the work, it's a great effort!
I would ask you if you could separate the CSI code from the CPI code as it is the case between OpenStack Cinder CSI #5184 and OpenStack CPI #5491
It is redundant it is true, but this is to keep the code homogeneous as you can see with other implementations. We have a csi_driver folder and a external_cloud_controller folder under roles/kubernetes-apps
Maybe at some time when we have all CSIs and CPIs from the major cloud providers implemented, we could join the two in one deployment and bring the csi folder to external, but for now the CPIs are not all available from the official maintainers, they are not bundled, they are in separate github repositories etc.
@Miouge1 I don't know what you think about the separation of CSI and CPI. Should we proceed with it, or is it better to leave everything together for vsphere as it mutualises the parameters? I would eventually work on bringing the CPIs for other cloud providers as I did with the CSIs but they are not all fully available.
Also @pierreyves-lebrun, did you test the code with a master node and a worker node separated? As it sometimes brings up problems. Thanks.

@pierreyves-lebrun
Copy link
Contributor Author

Many thanks for the review!

I would ask you if you could separate the CSI code from the CPI code as it is the case between OpenStack Cinder CSI #5184 and OpenStack CPI #5491

I don’t mind splitting the CSI and CPI code, @Miouge1 I’d also like to get your input on this.

Also @pierreyves-lebrun, did you test the code with a master node and a worker node separated? As it sometimes brings up problems. Thanks.

I am not sure to understand your question, could you elaborate on the tests I should conduct?

@pierreyves-lebrun
Copy link
Contributor Author

Thank you for your contribution, there are a couple of CI errors to resolve:

Those are now resolved.

Moreover it looks like your GitHub user is not associated with the commit email address which makes the CLA bot complain.

My bad, my commit was using different user information.
I amended the PR so that the commit and CLA user info match.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Apr 2, 2020
@alijahnas
Copy link
Contributor

Many thanks for the review!

I would ask you if you could separate the CSI code from the CPI code as it is the case between OpenStack Cinder CSI #5184 and OpenStack CPI #5491

I don’t mind splitting the CSI and CPI code, @Miouge1 I’d also like to get your input on this.

Also @pierreyves-lebrun, did you test the code with a master node and a worker node separated? As it sometimes brings up problems. Thanks.

I am not sure to understand your question, could you elaborate on the tests I should conduct?

It's just about launching the deployment with an inventory where you have one master and one worker node. Sometimes you can't see some errors when you have only one node playing the master and the worker at the same time.

@pierreyves-lebrun
Copy link
Contributor Author

It's just about launching the deployment with an inventory where you have one master and one worker node. Sometimes you can't see some errors when you have only one node playing the master and the worker at the same time.

Oh I see, that’s what you meant!

I always run my tests on a 3 masters - 3 workers cluster so I should be fine on that one.

@alijahnas
Copy link
Contributor

It's just about launching the deployment with an inventory where you have one master and one worker node. Sometimes you can't see some errors when you have only one node playing the master and the worker at the same time.

Oh I see, that’s what you meant!

I always run my tests on a 3 masters - 3 workers cluster so I should be fine on that one.

That's way enough! "Qui peut le plus peut le moins" :D

@Miouge1 Miouge1 added this to the 2.13 milestone Apr 2, 2020
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 3, 2020
@pierreyves-lebrun
Copy link
Contributor Author

/retest

@k8s-ci-robot
Copy link
Contributor

@pierreyves-lebrun: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@pierreyves-lebrun pierreyves-lebrun deleted the vsphere branch April 3, 2020 06:17
@pierreyves-lebrun pierreyves-lebrun restored the vsphere branch April 3, 2020 06:18
@pierreyves-lebrun pierreyves-lebrun deleted the vsphere branch April 3, 2020 06:20
@pierreyves-lebrun pierreyves-lebrun restored the vsphere branch April 3, 2020 06:59
@pierreyves-lebrun
Copy link
Contributor Author

pierreyves-lebrun commented Apr 3, 2020

That's way enough! "Qui peut le plus peut le moins" :D

Aha, je suppose oui! :-)

I separated the CSI code from the CPI code, could you review my PR again please?

@alijahnas
Copy link
Contributor

Sure I will :D

/ok-to-test

@alijahnas
Copy link
Contributor

/reopen

@k8s-ci-robot
Copy link
Contributor

@alijahnas: Failed to re-open PR: state cannot be changed. The vsphere branch was force-pushed or recreated.

In response to this:

/reopen

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.

@pierreyves-lebrun
Copy link
Contributor Author

Yep sorry I screwed things up when resolving conflicts, the CI tests couldn't run so I made a force push which is causing issues now.

I am happy to close this PR and resubmit a new one if that makes things easier.

Copy link
Contributor

@alijahnas alijahnas left a comment

Choose a reason for hiding this comment

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

roles/kubernetes-apps/meta/main.yml Show resolved Hide resolved
docs/vsphere-csi.md Show resolved Hide resolved
@alijahnas
Copy link
Contributor

Yep sorry I screwed things up when resolving conflicts, the CI tests couldn't run so I made a force push which is causing issues now.

I am happy to close this PR and resubmit a new one if that makes things easier.

Yeah no worries. I don't know what is the procedure in this case. @Miouge1 should know better.

Copy link
Contributor Author

@pierreyves-lebrun pierreyves-lebrun left a comment

Choose a reason for hiding this comment

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

I made all the changes, @alijahnas could you please review them once @Miouge1 re-opens the PR?

roles/kubernetes-apps/meta/main.yml Show resolved Hide resolved
docs/vsphere-csi.md Show resolved Hide resolved
@pierreyves-lebrun
Copy link
Contributor Author

Unless I get a reply I’ll resubmit my work as another PR, vSphere CSI 2.0 is coming anyway:

kubernetes-sigs/vsphere-csi-driver#151

@alijahnas
Copy link
Contributor

I am alright with that 👍

@Miouge1
Copy link
Contributor

Miouge1 commented Apr 11, 2020

@pierreyves-lebrun sometimes it's easier to open a new PR than to fix a broken merge or rebase :D

In practice when you need to "update from latest master" or "rebase on latest master", here is what I do:

git checkout master
git pull upstream master
git checkout my-branch
git rebase master

Then if there are any conflicts you have to resolve them as they show up and git add the files and git rebase --continue after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants