Skip to content

Commit 324eda5

Browse files
committed
fix gateway cleanup
Change-Id: I95224fd22d115c4abf2eea48f7ae61f0524c62c9
1 parent 6272a18 commit 324eda5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/controller/controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ func cleanupLoadBalancer(lbController cloudprovider.LoadBalancer, name string) {
368368

369369
func cleanupGateway(name string) {
370370
// create fake service to pass to the cloud provider method
371-
v, err := container.GetLabelValue(name, constants.LoadBalancerNameLabelKey)
371+
v, err := container.GetLabelValue(name, constants.GatewayNameLabelKey)
372372
if err != nil || v == "" {
373373
klog.Infof("could not get the label for the loadbalancer on container %s : %v", name, err)
374374
return

pkg/gateway/gateway.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func (c *Controller) syncGateway(key string) error {
174174
}
175175
}
176176
}
177-
if !container.Exist(name) {
177+
if !container.Exist(containerName) {
178178
klog.V(2).Infof("creating container %s for gateway %s/%s on cluster %s", containerName, namespace, name, c.clusterName)
179179
enableTunnels := c.tunnelManager != nil || config.DefaultConfig.LoadBalancerConnectivity == config.Portmap
180180
err := createGateway(c.clusterName, c.xdsLocalAddress, c.xdsLocalPort, gw, enableTunnels)

0 commit comments

Comments
 (0)