mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-05 19:21:37 +00:00
PV controller: Set StorageClassName during provisioning
This commit is contained in:
@@ -1331,7 +1331,7 @@ func (ctrl *PersistentVolumeController) provisionClaimOperation(claimObj interfa
|
||||
// by storage.AlphaStorageClassAnnotation
|
||||
// TODO: remove this check in 1.5, storage.StorageClassAnnotation will be always non-empty there.
|
||||
if claimClass != "" {
|
||||
metav1.SetMetaDataAnnotation(&volume.ObjectMeta, v1.BetaStorageClassAnnotation, claimClass)
|
||||
volume.Spec.StorageClassName = claimClass
|
||||
}
|
||||
|
||||
// Try to create the PV object several times
|
||||
|
Reference in New Issue
Block a user