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

Implement ValidateVolumeCapabilities and refactor parameter handling for more comprehensive validation of existing disks in all cloud calls #467

Merged
merged 2 commits into from
Feb 13, 2020

Conversation

davidz627
Copy link
Contributor

@davidz627 davidz627 commented Feb 6, 2020

TODO:

  • Add some unit tests for new functions :)

/kind cleanup
/kind feature
/assign @msau42 @misterikkit

Partially does #384 (Still need to do Node side validation in a seperate PR)
Fixes #162

ValidateVolumeCapabilities validates that the given volume conforms to all capabilities in the request. Validation of existing volumes during inserts also improved to check all parameters.

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Feb 6, 2020
@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Feb 6, 2020
@k8s-ci-robot k8s-ci-robot added 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 6, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidz627

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 Feb 6, 2020
Copy link
Contributor

@msau42 msau42 left a comment

Choose a reason for hiding this comment

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

How much of this is going to conflict with #415? Should we try getting that one in first?

}
switch strings.ToLower(k) {
case ParameterKeyType:
if v != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

should it be considered an error if a user specified a key without a value?

Copy link
Contributor Author

@davidz627 davidz627 Feb 7, 2020

Choose a reason for hiding this comment

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

in-tree PD just treats that case as the default. I tried setting type: "" and it just created a pd-standard without complaining - I think we should be backwards compatible here

@davidz627
Copy link
Contributor Author

#415 seems to have stalled and already has conflicts

@davidz627
Copy link
Contributor Author

@msau42 added unit tests, PTAL

pkg/common/parameters.go Outdated Show resolved Hide resolved
@msau42
Copy link
Contributor

msau42 commented Feb 13, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 13, 2020
@k8s-ci-robot k8s-ci-robot merged commit a38158b into kubernetes-sigs:master Feb 13, 2020
@davidz627 davidz627 deleted the fix/vvc branch February 13, 2020 01:37
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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement ValidateVolumeCapabilities
4 participants