scheduler: fix the handling of the *PropatationPolicy updates (#351)

Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
This commit is contained in:
Iceber Gu 2021-05-18 18:10:37 +08:00 committed by GitHub
parent 4b5ec0c637
commit 831dfe27bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ func (s *Scheduler) onPropagationPolicyUpdate(old, cur interface{}) {
key, err := cache.MetaNamespaceKeyFunc(binding) key, err := cache.MetaNamespaceKeyFunc(binding)
if err != nil { if err != nil {
klog.Errorf("couldn't get key for object %#v: %v", binding, err) klog.Errorf("couldn't get key for object %#v: %v", binding, err)
return continue
} }
klog.Infof("Requeue ResourceBinding(%s/%s) as placement changed.", binding.Namespace, binding.Name) klog.Infof("Requeue ResourceBinding(%s/%s) as placement changed.", binding.Namespace, binding.Name)
s.queue.Add(key) s.queue.Add(key)
@ -237,7 +237,7 @@ func (s *Scheduler) onClusterPropagationPolicyUpdate(old, cur interface{}) {
key, err := cache.MetaNamespaceKeyFunc(clusterResourceBinding) key, err := cache.MetaNamespaceKeyFunc(clusterResourceBinding)
if err != nil { if err != nil {
klog.Errorf("couldn't get key for object %#v: %v", clusterResourceBinding, err) klog.Errorf("couldn't get key for object %#v: %v", clusterResourceBinding, err)
return continue
} }
klog.Infof("Requeue ClusterResourceBinding(%s) as placement changed.", clusterResourceBinding.Name) klog.Infof("Requeue ClusterResourceBinding(%s) as placement changed.", clusterResourceBinding.Name)
s.queue.Add(key) s.queue.Add(key)