Merge pull request #96150 from lixiaobing1/deleteUpdate

fix note delete to update according to code
This commit is contained in:
Kubernetes Prow Robot 2020-11-10 18:55:48 -08:00 committed by GitHub
commit c0a30067f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

5
pkg/scheduler/eventhandlers.go Normal file → Executable file
View File

@ -435,8 +435,7 @@ func addAllEventHandlers(
) )
} }
// On add and delete of PVs, it will affect equivalence cache items // On add and update of PVs.
// related to persistent volume
informerFactory.Core().V1().PersistentVolumes().Informer().AddEventHandler( informerFactory.Core().V1().PersistentVolumes().Informer().AddEventHandler(
cache.ResourceEventHandlerFuncs{ cache.ResourceEventHandlerFuncs{
// MaxPDVolumeCountPredicate: since it relies on the counts of PV. // 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( informerFactory.Core().V1().PersistentVolumeClaims().Informer().AddEventHandler(
cache.ResourceEventHandlerFuncs{ cache.ResourceEventHandlerFuncs{
AddFunc: sched.onPvcAdd, AddFunc: sched.onPvcAdd,