From 5d1c7c77b4e8e9ad970e23f796b055f071bd0f35 Mon Sep 17 00:00:00 2001 From: NickrenREN Date: Thu, 23 Mar 2017 14:55:30 +0800 Subject: [PATCH] Fix PVC Annotations annDynamicallyProvisioned is added to PV, PVC has annStorageProvisioner --- pkg/controller/volume/persistentvolume/pv_controller_base.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/volume/persistentvolume/pv_controller_base.go b/pkg/controller/volume/persistentvolume/pv_controller_base.go index a279d124e3..3ca34cea0c 100644 --- a/pkg/controller/volume/persistentvolume/pv_controller_base.go +++ b/pkg/controller/volume/persistentvolume/pv_controller_base.go @@ -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 }