mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 21:25:09 +00:00
Fix PVC Annotations
annDynamicallyProvisioned is added to PV, PVC has annStorageProvisioner
This commit is contained in:
@@ -449,7 +449,7 @@ func (ctrl *PersistentVolumeController) upgradeVolumeFrom1_2(volume *v1.Persiste
|
||||
// setClaimProvisioner saves
|
||||
// claim.Annotations[annStorageProvisioner] = class.Provisioner
|
||||
func (ctrl *PersistentVolumeController) setClaimProvisioner(claim *v1.PersistentVolumeClaim, class *storage.StorageClass) (*v1.PersistentVolumeClaim, error) {
|
||||
if val, ok := claim.Annotations[annDynamicallyProvisioned]; ok && val == class.Provisioner {
|
||||
if val, ok := claim.Annotations[annStorageProvisioner]; ok && val == class.Provisioner {
|
||||
// annotation is already set, nothing to do
|
||||
return claim, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user