Skip to content

Commit ce363d7

Browse files
committed
Add frontend address type check when filtering NodeBalancers by subnet ID as well. Also update Linodego commit.
1 parent e30bbfa commit ce363d7

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

cloud/linode/loadbalancers.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -730,9 +730,10 @@ func (l *loadbalancers) getNodeBalancerByIP(ctx context.Context, service *v1.Ser
730730
// filter by subnet ID if specified for frontend vpc ip
731731
frontendSubnetID := service.GetAnnotations()[annotations.NodeBalancerFrontendSubnetID]
732732
if frontendSubnetID != "" {
733-
for _, NB := range lbs {
734-
if NB.FrontendVPCSubnetID != nil && strconv.Itoa(*NB.FrontendVPCSubnetID) == frontendSubnetID {
735-
return &NB, nil
733+
for _, lb := range lbs {
734+
if lb.FrontendAddressType != nil && *lb.FrontendAddressType == "vpc" &&
735+
lb.FrontendVPCSubnetID != nil && strconv.Itoa(*lb.FrontendVPCSubnetID) == frontendSubnetID {
736+
return &lb, nil
736737
}
737738
}
738739
return nil, lbNotFoundError{serviceNn: getServiceNn(service)}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ require (
171171
)
172172

173173
replace (
174-
github.com/linode/linodego => github.com/komer3/linodego v0.0.0-20260108221407-e53356cae886
174+
github.com/linode/linodego => github.com/komer3/linodego v0.0.0-20260108222147-d95d8e4337b2
175175
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.34.1
176176
k8s.io/cri-api => k8s.io/cri-api v0.34.1
177177
k8s.io/cri-client => k8s.io/cri-client v0.34.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI
186186
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
187187
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
188188
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
189-
github.com/komer3/linodego v0.0.0-20260108221407-e53356cae886 h1:P28cgWCGKeDhVj73yUc6a1uAO9L+eAT0hWHbe8PCrsY=
190-
github.com/komer3/linodego v0.0.0-20260108221407-e53356cae886/go.mod h1:GoiwLVuLdBQcAebxAVKVL3mMYUgJZR/puOUSla04xBE=
189+
github.com/komer3/linodego v0.0.0-20260108222147-d95d8e4337b2 h1:AfDTddQq6q8eR4cDB5CZfZ6rRfmwqTjxrbJqE9kSjLk=
190+
github.com/komer3/linodego v0.0.0-20260108222147-d95d8e4337b2/go.mod h1:GoiwLVuLdBQcAebxAVKVL3mMYUgJZR/puOUSla04xBE=
191191
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
192192
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
193193
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=

0 commit comments

Comments
 (0)