From f66e391ee76c6f35215aedbe19442f930e908389 Mon Sep 17 00:00:00 2001 From: lihanbo Date: Thu, 17 Mar 2022 14:55:56 +0800 Subject: [PATCH] bugfix: update Resource info when update attached binding Signed-off-by: lihanbo --- pkg/dependenciesdistributor/dependencies_distributor.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/dependenciesdistributor/dependencies_distributor.go b/pkg/dependenciesdistributor/dependencies_distributor.go index d34321ca1..05fc549c6 100644 --- a/pkg/dependenciesdistributor/dependencies_distributor.go +++ b/pkg/dependenciesdistributor/dependencies_distributor.go @@ -603,6 +603,7 @@ func (d *DependenciesDistributor) createOrUpdateAttachedBinding(attachedBinding updatedBindingSnapshot := mergeBindingSnapshot(existBinding.Spec.RequiredBy, attachedBinding.Spec.RequiredBy) existBinding.Spec.RequiredBy = updatedBindingSnapshot existBinding.Labels = util.DedupeAndMergeLabels(existBinding.Labels, attachedBinding.Labels) + existBinding.Spec.Resource = attachedBinding.Spec.Resource if err := d.Client.Update(context.TODO(), existBinding); err != nil { klog.Errorf("failed to update resource binding(%s/%s): %v", existBinding.Namespace, existBinding.Name, err)