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

Don't process PVCs for in-tree volumes #350

Merged
merged 1 commit into from
Oct 2, 2019

Conversation

jsafrane
Copy link
Contributor

If I understand code in ProvisionExt, PVCs that require migrated in-tree provisioner in their StorageClass have their volume.beta.kubernetes.io/storage-provisioner annotation set to CSI driver name.

Therefore we do not need the provisioner library to listen for PVCs with in-tree provisioner at all and save some (little) CPU in unrelated PVC processing. I keep the check in ProvisionExt, just in case.

@ddebroy, PTAL carefuly.

/kind cleanup

Does this PR introduce a user-facing change?:

NONE

Request for provisioning of in-tree volume plugins that were migrated to
CSI will always have CSI driver name in annStorageProvisioner.
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Sep 30, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jsafrane

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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 30, 2019
@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 Sep 30, 2019
@msau42
Copy link
Collaborator

msau42 commented Oct 1, 2019

/assign @ddebroy @davidz627
Will this work or does lib still need the option to check storageclass.provisioner?

@ddebroy
Copy link
Collaborator

ddebroy commented Oct 1, 2019

The additionalProvisionerNames is still necessary to keep this check at https://github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/blob/master/controller/controller.go#L1234 happy for migration scenarios. Note that check in lib-external-provisioner depends on the provisioner set in storage class rather than annotations.

Without populating additionalProvisionerNames, we end up with the following error message for migration scenarios.

controller.go:1235] provision "default/podpvc" class "standard": unknown provisioner 
"kubernetes.io/gce-pd" requested in claim's StorageClass

We discussed this a bit at #341 (comment)

I agree with the spirit of the PR. Maybe we can refactor https://github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/blob/master/controller/controller.go#L1234 to allow for this?

@jsafrane
Copy link
Contributor Author

jsafrane commented Oct 1, 2019

I see. I reworked the PR to still pass additional provisioners to the lib, but rejecting PVCs in ShouldProvision. PTAL.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 1, 2019
Copy link
Collaborator

@ddebroy ddebroy left a comment

Choose a reason for hiding this comment

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

Only one nit: how about

var _ controller.Qualifier = &csiProvisioner{}

here. Otherwise lgtm.

@jsafrane
Copy link
Contributor Author

jsafrane commented Oct 2, 2019

var _ controller.Qualifier = &csiProvisioner{}

Good idea, added.

@ddebroy
Copy link
Collaborator

ddebroy commented Oct 2, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 2, 2019
@k8s-ci-robot k8s-ci-robot merged commit 55f5ede into kubernetes-csi:master Oct 2, 2019
kbsonlong pushed a commit to kbsonlong/external-provisioner that referenced this pull request Dec 29, 2023
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. 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