mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Merge pull request #43555 from NickrenREN/pv-setClaimProvisioner
Automatic merge from submit-queue Fix PVC Annotations annDynamicallyProvisioned is added to PV, while PVC has annStorageProvisioner. **Release note**: ```release-note NONE ```
This commit is contained in:
commit
2169beed23
@ -449,7 +449,7 @@ func (ctrl *PersistentVolumeController) upgradeVolumeFrom1_2(volume *v1.Persiste
|
|||||||
// setClaimProvisioner saves
|
// setClaimProvisioner saves
|
||||||
// claim.Annotations[annStorageProvisioner] = class.Provisioner
|
// claim.Annotations[annStorageProvisioner] = class.Provisioner
|
||||||
func (ctrl *PersistentVolumeController) setClaimProvisioner(claim *v1.PersistentVolumeClaim, class *storage.StorageClass) (*v1.PersistentVolumeClaim, error) {
|
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
|
// annotation is already set, nothing to do
|
||||||
return claim, nil
|
return claim, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user