-
Notifications
You must be signed in to change notification settings - Fork 727
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
Standard might not be the default storage class #1061
Standard might not be the default storage class #1061
Conversation
…be-the-default-storage-class
return reflect.DeepEqual(claim.Spec.StorageClassName, candidate.Spec.StorageClassName) | ||
if claim.Spec.StorageClassName == nil { | ||
// volumeClaimTemplate has no storageClass set | ||
return true |
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.
not sure I understand why we return true here? I read it as "if there is no storage class requested, then the candidate PV is compatible" which sounds wrong?
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.
Hmm I guess we have no way of knowing what is the "default" storage class on a given cluster, so we fallback to anything?
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.
Yes, that's it
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.
Maybe we should get that comment a bit more explicit:
// volumeClaimTemplate has no storageClass set: it should use the k8s cluster default
// since we don't know that default, we fallback to reusing any available volume
// from the same cluster (whatever the storage class actually is)
standard
might not be the default storage class, or there may be no storage class at all.In that case we should not try to compare the storage class and return
true
.