From 89193623fceef20de704d40b98dc2129cd399d47 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 15 Oct 2024 21:45:09 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20fix:=20always=20watch=20endpoint?= =?UTF-8?q?=20if=20cilium=20nr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/ingress/controller/controller.go | 2 +- pkg/vngcloud/vlb.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/ingress/controller/controller.go b/pkg/ingress/controller/controller.go index 9b7920b..9d97174 100644 --- a/pkg/ingress/controller/controller.go +++ b/pkg/ingress/controller/controller.go @@ -1193,7 +1193,7 @@ func (c *Controller) ensureCompareIngress(_, ing *nwv1.Ingress) (*lObjects.LoadB return nil, err } c.cacheLoadBalancerBuilder[fmt.Sprintf("%s/%s", ing.Namespace, ing.Name)] = newIngExpander - c.resourceDependant.SetIngress(ing, newIngExpander.serviceConf.TargetType == TargetTypeIP) + c.resourceDependant.SetIngress(ing, newIngExpander.serviceConf.TargetType == TargetTypeIP || c.cniType == cni_detector.CiliumNativeRouting) return lb, nil } diff --git a/pkg/vngcloud/vlb.go b/pkg/vngcloud/vlb.go index 1f0410c..c4d1e52 100644 --- a/pkg/vngcloud/vlb.go +++ b/pkg/vngcloud/vlb.go @@ -324,7 +324,7 @@ func (c *vLB) ensureLoadBalancer( "Load balancer %s for service %s/%s is ready to use for Kubernetes controller\n----- DONE ----- ", lb.Name, pService.Namespace, pService.Name) - c.resourceDependant.SetService(pService, newIngExpander.serviceConf.TargetType == TargetTypeIP) + c.resourceDependant.SetService(pService, newIngExpander.serviceConf.TargetType == TargetTypeIP || c.cniType == cni_detector.CiliumNativeRouting) return lbStatus, nil }