From 0097adc1c512c86eb48ecc8aaddbe1ce615086ae Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Thu, 2 Mar 2017 10:23:56 +0100 Subject: [PATCH] PV controller: Set StorageClassName during provisioning --- pkg/controller/volume/persistentvolume/pv_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/volume/persistentvolume/pv_controller.go b/pkg/controller/volume/persistentvolume/pv_controller.go index 5f8aac18532..c3385a5483c 100644 --- a/pkg/controller/volume/persistentvolume/pv_controller.go +++ b/pkg/controller/volume/persistentvolume/pv_controller.go @@ -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