From a91056a3caff58c39f93bd87f5b677f5d50ac62a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A5=96=E5=BB=BA?= Date: Mon, 25 Jul 2022 14:29:36 +0800 Subject: [PATCH] enqueue subnets after vpc update (#1722) --- pkg/controller/vpc.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg/controller/vpc.go b/pkg/controller/vpc.go index 6dee236ff4c..499f23b4918 100644 --- a/pkg/controller/vpc.go +++ b/pkg/controller/vpc.go @@ -447,6 +447,17 @@ func (c *Controller) handleAddOrUpdateVpc(key string) error { return err } + subnets, err := c.subnetsLister.List(labels.Everything()) + if err != nil { + return err + } + + for _, subnet := range subnets { + if subnet.Spec.Vpc == key { + c.addOrUpdateSubnetQueue.Add(subnet.Name) + } + } + return nil }