From 2cba0a02f7da9fc16b4f41fba8fb660fad7c4285 Mon Sep 17 00:00:00 2001
From: lixiaobing1
Date: Tue, 3 Nov 2020 18:52:52 +0800
Subject: [PATCH] fix note delete to update according to code
---
pkg/scheduler/eventhandlers.go | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
mode change 100644 => 100755 pkg/scheduler/eventhandlers.go
diff --git a/pkg/scheduler/eventhandlers.go b/pkg/scheduler/eventhandlers.go
old mode 100644
new mode 100755
index 5288573f12e..f7736f1c3b0
--- a/pkg/scheduler/eventhandlers.go
+++ b/pkg/scheduler/eventhandlers.go
@@ -435,8 +435,7 @@ func addAllEventHandlers(
)
}
- // On add and delete of PVs, it will affect equivalence cache items
- // related to persistent volume
+ // On add and update of PVs.
informerFactory.Core().V1().PersistentVolumes().Informer().AddEventHandler(
cache.ResourceEventHandlerFuncs{
// MaxPDVolumeCountPredicate: since it relies on the counts of PV.
@@ -445,7 +444,7 @@ func addAllEventHandlers(
},
)
- // This is for MaxPDVolumeCountPredicate: add/delete PVC will affect counts of PV when it is bound.
+ // This is for MaxPDVolumeCountPredicate: add/update PVC will affect counts of PV when it is bound.
informerFactory.Core().V1().PersistentVolumeClaims().Informer().AddEventHandler(
cache.ResourceEventHandlerFuncs{
AddFunc: sched.onPvcAdd,