mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +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
|
// 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
|
||||||
|
Loading…
Reference in New Issue
Block a user