-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
vSphere storage policy support for dynamic volume provisioning #46176
vSphere storage policy support for dynamic volume provisioning #46176
Conversation
Hi @BaluDontu. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with 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-bot ok to test |
@BaluDontu: you can't request testing unless you are a kubernetes member. In response to this:
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. |
/assign @saad-ali |
@k8s-bot ok to test |
c326cf1
to
8e516d1
Compare
} | ||
dsMoList, err := vs.getDatastoreMo(ctx, nonCompatibleHubs) | ||
if err != nil { | ||
return nil |
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.
we should return err
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.
No, GetNonCompatibleDatastoresMo returns datastore list if there are any, otherwise nil. Check the return type.
efdbb8d
to
962717e
Compare
@kubernetes/sig-storage-api-reviews @kubernetes/sig-storage-feature-requests @kubernetes/sig-storage-pr-reviews |
f4b5c5d
to
5c26f3b
Compare
/approve |
Rebased the PR and resolved any conflicts.. |
/lgtm |
/approve |
/approve |
3442a22
to
eb3cf50
Compare
Rebased the PR again. |
@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: BaluDontu, divyenpatel, jingxu97, lavalamp, msau42
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@BaluDontu: The following test(s) failed:
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
Automatic merge from submit-queue |
…cySupport Automatic merge from submit-queue (batch tested with PRs 45949, 46009, 46320, 46423, 46437) e2e tests for storage policy support in Kubernetes This PR covers e2e test cases for vSphere storage policy support in Kubernetes - kubernetes#46176. The following test scenario have been implemented. - Specify only SPBM storage policy name. - Verify if the disk is provisioned on a compatible datastore with max free space. - Specify a storage policy name which is not defined on VC. - Verify if PVC create errors out that no pbm profile with this policy is found. - Specify both SPBM storage policy name and VSAN capabilities together. - Verify if PVC create errors out that you can't use both SPBM policy name with VSAN capabilities. You can only specify one. - Specify SPBM storage policy name with user specified datastore which is non-compatible. - Verify if PVC create errors out that it can't provision a disk on a non-compatible datastore. @jeffvance @divyenpatel **Release note**: ```release-note None ```
Till now, vSphere cloud provider provides support to configure persistent volume with VSAN storage capabilities - #42974. Right now this only works with VSAN.
Also there might be other use cases:
We can achieve about 2 use cases by using existing storage policies which are already created on vCenter using the Storage Policy Based Management service. The user will specify the SPBM policy ID as part of dynamic provisioning
For instance in the below example, the volume will created on a compatible datastore with max free space that satisfies the "Gold" storage policy requirements.
For instance in the below example, the vSphere CP checks if "VSANDatastore" is compatible with "Gold" storage policy requirements. If yes, volume will be provisioned on "VSANDatastore" else it will error that "VSANDatastore" is not compatible with the exact reason for failure.
As a part of this change, 4 commits have been added to this PR.
Release note: