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

We want to support copying of a PV with no storage class defined, for case of NFS -> NFS #300

Closed
jwmatthews opened this issue Aug 30, 2019 · 1 comment
Milestone

Comments

@jwmatthews
Copy link
Contributor

Related to issue in ui:
migtools/mig-ui#509

When we do a copy of PVs of NFS to NFS, a storageclass is typically not involved.

With current implementation we need to create a dummy storageclass on destination that has no-provisioner.

We want to update the implementation to support when 'no storageclass' is defined.

https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1

PVCs don’t necessarily have to request a class. 

A PVC with its storageClassName set equal to "" is always interpreted to be requesting a PV with no class, so it can only be bound to PVs with no class (no annotation or one set equal to ""). 

A PVC with no storageClassName is not quite the same and is treated differently by the cluster depending on whether the DefaultStorageClass admission plugin is turned on.

If the admission plugin is turned on, the administrator may specify a default StorageClass. All PVCs that have no storageClassName can be bound only to PVs of that default. Specifying a default StorageClass is done by setting the annotation storageclass.kubernetes.io/is-default-class equal to “true” in a StorageClass object. If the administrator does not specify a default, the cluster responds to PVC creation as if the admission plugin were turned off. If more than one default is specified, the admission plugin forbids the creation of all PVCs.
If the admission plugin is turned off, there is no notion of a default StorageClass. All PVCs that have no storageClassName can be bound only to PVs that have no class. In this case, the PVCs that have no storageClassName are treated the same way as PVCs that have their storageClassName set to "".
Depending on installation method, a default StorageClass may be deployed to Kubernetes cluster by addon manager during installation.

When a PVC specifies a selector in addition to requesting a StorageClass, the requirements are ANDed together: only a PV of the requested class and with the requested labels may be bound to the PVC.
@sseago
Copy link
Contributor

sseago commented Sep 18, 2019

Fixed with #304

@jortel jortel added this to the 1.0.0 milestone Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants