PV controller: Set StorageClassName during provisioning

This commit is contained in:
Jan Safranek 2017-03-02 10:23:56 +01:00
parent 7ae4152712
commit 0097adc1c5

View File

@ -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