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 DatastoreMigrationParam to unsupported storage class params Set #1077

Merged
merged 2 commits into from
Jul 6, 2021
Merged

Add DatastoreMigrationParam to unsupported storage class params Set #1077

merged 2 commits into from
Jul 6, 2021

Conversation

chethanv28
Copy link
Collaborator

@chethanv28 chethanv28 commented Jul 3, 2021

What this PR does / why we need it:
This PR is adding DatastoreMigrationParam to the unsupported SC params Set to prevent users from creating storage classes using VCP storage class parameters
See Step 6, bullet number 2 in https://vsphere-csi-driver.sigs.k8s.io/features/vsphere_csi_migration.html#how-to-enable-vsphere-csi-migration for more details

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Testing done:

cat sc-1.yaml 
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: example-sc-unsupi-1
  annotations:
    storageclass.kubernetes.io/is-default-class: "true"
parameters:
  datastore-migrationparam: vsanDatastore
provisioner: csi.vsphere.vmware.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
kubectl create -f sc-1.yaml 
Error from server (Invalid StorageClass Parameters. Migration specific parameters should not be used in the StorageClass): error when creating "sc-1.yaml": admission webhook "validation.csi.vsphere.vmware.com" denied the request: Invalid StorageClass Parameters. Migration specific parameters should not be used in the StorageClass

Special notes for your reviewer:

Release note:

Add DatastoreMigrationParam to unsupported storage class params Set

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 3, 2021
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 3, 2021
@chethanv28
Copy link
Collaborator Author

cc: @divyenpatel

Copy link
Member

@divyenpatel divyenpatel left a comment

Choose a reason for hiding this comment

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

/approve
/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jul 6, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chethanv28, divyenpatel

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:
  • OWNERS [chethanv28,divyenpatel]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@divyenpatel
Copy link
Member

@chethanv28 Can you check if we can enhance the unit test to cover this?

@divyenpatel divyenpatel added the release-2.3.0-candidate Indicates PR needs to be cherry-picked for 2.3.0 release label Jul 6, 2021
@chethanv28
Copy link
Collaborator Author

@chethanv28 Can you check if we can enhance the unit test to cover this?

Added

@divyenpatel
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 6, 2021
@k8s-ci-robot k8s-ci-robot merged commit 024f438 into kubernetes-sigs:master Jul 6, 2021
k8s-ci-robot pushed a commit that referenced this pull request Jul 6, 2021
…1077) (#1083)

* Add DatastoreMigrationParam to unsupported storage class params Set

* Add datastore-migrationparam check in validate storage class unit tests
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-2.2.2-candidate release-2.2.2-cherry-picked release-2.3.0-candidate Indicates PR needs to be cherry-picked for 2.3.0 release release-2.3.0-cherry-picked Indicates PR is cherry-picked for 2.3.0 release size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants