Commit 0097adc1 authored by Jan Safranek's avatar Jan Safranek

PV controller: Set StorageClassName during provisioning

parent 7ae41527
...@@ -1331,7 +1331,7 @@ func (ctrl *PersistentVolumeController) provisionClaimOperation(claimObj interfa ...@@ -1331,7 +1331,7 @@ func (ctrl *PersistentVolumeController) provisionClaimOperation(claimObj interfa
// by storage.AlphaStorageClassAnnotation // by storage.AlphaStorageClassAnnotation
// TODO: remove this check in 1.5, storage.StorageClassAnnotation will be always non-empty there. // TODO: remove this check in 1.5, storage.StorageClassAnnotation will be always non-empty there.
if claimClass != "" { if claimClass != "" {
metav1.SetMetaDataAnnotation(&volume.ObjectMeta, v1.BetaStorageClassAnnotation, claimClass) volume.Spec.StorageClassName = claimClass
} }
// Try to create the PV object several times // Try to create the PV object several times
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment