mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
PV controller: Set StorageClassName during provisioning
This commit is contained in:
parent
7ae4152712
commit
0097adc1c5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user