Skip to content

Commit a8e0f59

Browse files
author
Rahul Sharma
committed
intial commit for nb-vpc support
1 parent bb765c2 commit a8e0f59

File tree

6 files changed

+132
-43
lines changed

6 files changed

+132
-43
lines changed

cloud/annotations/annotations.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,10 @@ const (
3333
AnnLinodeHostUUID = "node.k8s.linode.com/host-uuid"
3434

3535
AnnLinodeNodeIPSharingUpdated = "node.k8s.linode.com/ip-sharing-updated"
36+
37+
NodeBalancerBackendIPv4Range = "service.beta.kubernetes.io/linode-loadbalancer-backend-ipv4-range"
38+
NodeBalancerBackendIPv6Range = "service.beta.kubernetes.io/linode-loadbalancer-backend-ipv6-range"
39+
40+
NodeBalancerBackendVPCName = "service.beta.kubernetes.io/linode-loadbalancer-backend-vpc-name"
41+
NodeBalancerBackendSubnetName = "service.beta.kubernetes.io/linode-loadbalancer-backend-subnet-name"
3642
)

cloud/linode/loadbalancers.go

Lines changed: 69 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,12 @@ func (l *loadbalancers) updateNodeBalancer(
383383
}
384384
// Add all of the Nodes to the config
385385
newNBNodes := make([]linodego.NodeBalancerConfigRebuildNodeOptions, 0, len(nodes))
386+
subnetID := 0
387+
if nb.GetCreateOptions().VPCs != nil {
388+
subnetID = nb.GetCreateOptions().VPCs[0].SubnetID
389+
}
386390
for _, node := range nodes {
387-
newNodeOpts := l.buildNodeBalancerNodeConfigRebuildOptions(node, port.NodePort)
391+
newNodeOpts := l.buildNodeBalancerNodeConfigRebuildOptions(node, port.NodePort, subnetID)
388392
oldNodeID, ok := oldNBNodeIDs[newNodeOpts.Address]
389393
if ok {
390394
newNodeOpts.ID = oldNodeID
@@ -640,6 +644,20 @@ func (l *loadbalancers) createNodeBalancer(ctx context.Context, clusterName stri
640644
Tags: tags,
641645
}
642646

647+
backendIPv4Range, ok := service.GetAnnotations()[annotations.NodeBalancerBackendIPv4Range]
648+
if ok {
649+
subnetID, err := l.getSubnetIDForSVC(ctx, service)
650+
if err != nil {
651+
return nil, err
652+
}
653+
createOpts.VPCs = []linodego.NodeBalancerVPCOptions{
654+
{
655+
SubnetID: subnetID,
656+
IPv4Range: backendIPv4Range,
657+
},
658+
}
659+
}
660+
643661
fwid, ok := service.GetAnnotations()[annotations.AnnLinodeCloudFirewallID]
644662
if ok {
645663
firewallID, err := strconv.Atoi(fwid)
@@ -756,6 +774,27 @@ func (l *loadbalancers) addTLSCert(ctx context.Context, service *v1.Service, nbC
756774
return nil
757775
}
758776

777+
func (l *loadbalancers) getSubnetIDForSVC(ctx context.Context, service *v1.Service) (int, error) {
778+
if Options.VPCNames == "" {
779+
return 0, fmt.Errorf("CCM not configured with VPC, cannot create NodeBalancer with specified annotation")
780+
}
781+
vpcName := strings.Split(Options.VPCNames, ",")[0]
782+
specifiedVPCName, ok := service.GetAnnotations()[annotations.NodeBalancerBackendVPCName]
783+
if ok {
784+
vpcName = specifiedVPCName
785+
}
786+
vpcID, err := GetVPCID(ctx, l.client, vpcName)
787+
if err != nil {
788+
return 0, err
789+
}
790+
subnetName := strings.Split(Options.SubnetNames, ",")[0]
791+
specifiedSubnetName, ok := service.GetAnnotations()[annotations.NodeBalancerBackendSubnetName]
792+
if ok {
793+
subnetName = specifiedSubnetName
794+
}
795+
return GetSubnetID(ctx, l.client, vpcID, subnetName)
796+
}
797+
759798
// buildLoadBalancerRequest returns a linodego.NodeBalancer
760799
// requests for service across nodes.
761800
func (l *loadbalancers) buildLoadBalancerRequest(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*linodego.NodeBalancer, error) {
@@ -765,6 +804,16 @@ func (l *loadbalancers) buildLoadBalancerRequest(ctx context.Context, clusterNam
765804
ports := service.Spec.Ports
766805
configs := make([]*linodego.NodeBalancerConfigCreateOptions, 0, len(ports))
767806

807+
subnetID := 0
808+
_, ok := service.GetAnnotations()[annotations.NodeBalancerBackendIPv4Range]
809+
if ok {
810+
id, err := l.getSubnetIDForSVC(ctx, service)
811+
if err != nil {
812+
return nil, err
813+
}
814+
subnetID = id
815+
}
816+
768817
for _, port := range ports {
769818
if port.Protocol == v1.ProtocolUDP {
770819
return nil, fmt.Errorf("error creating NodeBalancer Config: ports with the UDP protocol are not supported")
@@ -777,7 +826,7 @@ func (l *loadbalancers) buildLoadBalancerRequest(ctx context.Context, clusterNam
777826
createOpt := config.GetCreateOptions()
778827

779828
for _, n := range nodes {
780-
createOpt.Nodes = append(createOpt.Nodes, l.buildNodeBalancerNodeConfigRebuildOptions(n, port.NodePort).NodeBalancerNodeCreateOptions)
829+
createOpt.Nodes = append(createOpt.Nodes, l.buildNodeBalancerNodeConfigRebuildOptions(n, port.NodePort, subnetID).NodeBalancerNodeCreateOptions)
781830
}
782831

783832
configs = append(configs, &createOpt)
@@ -797,17 +846,21 @@ func coerceString(s string, minLen, maxLen int, padding string) string {
797846
return s
798847
}
799848

800-
func (l *loadbalancers) buildNodeBalancerNodeConfigRebuildOptions(node *v1.Node, nodePort int32) linodego.NodeBalancerConfigRebuildNodeOptions {
801-
return linodego.NodeBalancerConfigRebuildNodeOptions{
849+
func (l *loadbalancers) buildNodeBalancerNodeConfigRebuildOptions(node *v1.Node, nodePort int32, subnetID int) linodego.NodeBalancerConfigRebuildNodeOptions {
850+
nodeOptions := linodego.NodeBalancerConfigRebuildNodeOptions{
802851
NodeBalancerNodeCreateOptions: linodego.NodeBalancerNodeCreateOptions{
803-
Address: fmt.Sprintf("%v:%v", getNodePrivateIP(node), nodePort),
852+
Address: fmt.Sprintf("%v:%v", getNodePrivateIP(node, subnetID), nodePort),
804853
// NodeBalancer backends must be 3-32 chars in length
805854
// If < 3 chars, pad node name with "node-" prefix
806855
Label: coerceString(node.Name, 3, 32, "node-"),
807856
Mode: "accept",
808857
Weight: 100,
809858
},
810859
}
860+
if subnetID != 0 {
861+
nodeOptions.NodeBalancerNodeCreateOptions.SubnetID = subnetID
862+
}
863+
return nodeOptions
811864
}
812865

813866
func (l *loadbalancers) retrieveKubeClient() error {
@@ -914,13 +967,17 @@ func getPortConfigAnnotation(service *v1.Service, port int) (portConfigAnnotatio
914967
return annotation, nil
915968
}
916969

917-
// getNodePrivateIP should provide the Linode Private IP the NodeBalance
918-
// will communicate with. When using a VLAN or VPC for the Kubernetes cluster
919-
// network, this will not be the NodeInternalIP, so this prefers an annotation
920-
// cluster operators may specify in such a situation.
921-
func getNodePrivateIP(node *v1.Node) string {
922-
if address, exists := node.Annotations[annotations.AnnLinodeNodePrivateIP]; exists {
923-
return address
970+
// getNodePrivateIP provides the Linode Backend IP the NodeBalancer will communicate with.
971+
// If a service specifies NodeBalancerBackendIPv4Range annotation, it will
972+
// use NodeInternalIP of node.
973+
// For services which don't have NodeBalancerBackendIPv4Range annotation,
974+
// Backend IP can be overwritten to the one specified using AnnLinodeNodePrivateIP
975+
// annotation over the NodeInternalIP.
976+
func getNodePrivateIP(node *v1.Node, subnetID int) string {
977+
if subnetID == 0 {
978+
if address, exists := node.Annotations[annotations.AnnLinodeNodePrivateIP]; exists {
979+
return address
980+
}
924981
}
925982

926983
klog.Infof("Node %s, assigned IP addresses: %v", node.Name, node.Status.Addresses)

cloud/linode/loadbalancers_test.go

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2635,9 +2635,10 @@ func Test_getHealthCheckType(t *testing.T) {
26352635

26362636
func Test_getNodePrivateIP(t *testing.T) {
26372637
testcases := []struct {
2638-
name string
2639-
node *v1.Node
2640-
address string
2638+
name string
2639+
node *v1.Node
2640+
address string
2641+
subnetID int
26412642
}{
26422643
{
26432644
"node internal ip specified",
@@ -2652,6 +2653,7 @@ func Test_getNodePrivateIP(t *testing.T) {
26522653
},
26532654
},
26542655
"127.0.0.1",
2656+
0,
26552657
},
26562658
{
26572659
"node internal ip not specified",
@@ -2666,6 +2668,7 @@ func Test_getNodePrivateIP(t *testing.T) {
26662668
},
26672669
},
26682670
"",
2671+
0,
26692672
},
26702673
{
26712674
"node internal ip annotation present",
@@ -2685,12 +2688,33 @@ func Test_getNodePrivateIP(t *testing.T) {
26852688
},
26862689
},
26872690
"192.168.42.42",
2691+
0,
2692+
},
2693+
{
2694+
"node internal ip annotation present and subnet id is not zero",
2695+
&v1.Node{
2696+
ObjectMeta: metav1.ObjectMeta{
2697+
Annotations: map[string]string{
2698+
annotations.AnnLinodeNodePrivateIP: "192.168.42.42",
2699+
},
2700+
},
2701+
Status: v1.NodeStatus{
2702+
Addresses: []v1.NodeAddress{
2703+
{
2704+
Type: v1.NodeInternalIP,
2705+
Address: "10.0.1.1",
2706+
},
2707+
},
2708+
},
2709+
},
2710+
"10.0.1.1",
2711+
100,
26882712
},
26892713
}
26902714

26912715
for _, test := range testcases {
26922716
t.Run(test.name, func(t *testing.T) {
2693-
ip := getNodePrivateIP(test.node)
2717+
ip := getNodePrivateIP(test.node, test.subnetID)
26942718
if ip != test.address {
26952719
t.Error("unexpected certificate")
26962720
t.Logf("expected: %q", test.address)

go.mod

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ require (
6262
github.com/go-openapi/strfmt v0.23.0 // indirect
6363
github.com/go-openapi/swag v0.23.0 // indirect
6464
github.com/go-openapi/validate v0.24.0 // indirect
65-
github.com/go-resty/resty/v2 v2.16.3 // indirect
65+
github.com/go-resty/resty/v2 v2.16.5 // indirect
6666
github.com/gogo/protobuf v1.3.2 // indirect
6767
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
6868
github.com/golang/protobuf v1.5.4 // indirect
@@ -136,14 +136,14 @@ require (
136136
go.uber.org/multierr v1.11.0 // indirect
137137
go.uber.org/zap v1.27.0 // indirect
138138
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
139-
golang.org/x/crypto v0.32.0 // indirect
139+
golang.org/x/crypto v0.33.0 // indirect
140140
golang.org/x/mod v0.22.0 // indirect
141-
golang.org/x/net v0.34.0 // indirect
142-
golang.org/x/oauth2 v0.25.0 // indirect
143-
golang.org/x/sync v0.10.0 // indirect
144-
golang.org/x/sys v0.29.0 // indirect
145-
golang.org/x/term v0.28.0 // indirect
146-
golang.org/x/text v0.21.0 // indirect
141+
golang.org/x/net v0.35.0 // indirect
142+
golang.org/x/oauth2 v0.26.0 // indirect
143+
golang.org/x/sync v0.11.0 // indirect
144+
golang.org/x/sys v0.30.0 // indirect
145+
golang.org/x/term v0.29.0 // indirect
146+
golang.org/x/text v0.22.0 // indirect
147147
golang.org/x/time v0.8.0 // indirect
148148
golang.org/x/tools v0.29.0 // indirect
149149
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect
@@ -168,3 +168,5 @@ require (
168168
sigs.k8s.io/structured-merge-diff/v4 v4.5.0 // indirect
169169
sigs.k8s.io/yaml v1.4.0 // indirect
170170
)
171+
172+
replace github.com/linode/linodego => github.com/komer3/linodego v0.0.0-20250225164824-67e4203f0cee

go.sum

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3Bum
107107
github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ=
108108
github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
109109
github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
110-
github.com/go-resty/resty/v2 v2.16.3 h1:zacNT7lt4b8M/io2Ahj6yPypL7bqx9n1iprfQuodV+E=
111-
github.com/go-resty/resty/v2 v2.16.3/go.mod h1:hkJtXbA2iKHzJheXYvQ8snQES5ZLGKMwQ07xAwp/fiA=
110+
github.com/go-resty/resty/v2 v2.16.5 h1:hBKqmWrr7uRc3euHVqmh1HTHcKn99Smr7o5spptdhTM=
111+
github.com/go-resty/resty/v2 v2.16.5/go.mod h1:hkJtXbA2iKHzJheXYvQ8snQES5ZLGKMwQ07xAwp/fiA=
112112
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
113113
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
114114
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
@@ -193,6 +193,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI
193193
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
194194
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
195195
github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
196+
github.com/komer3/linodego v0.0.0-20250225164824-67e4203f0cee h1:AV1TOpgN6tbP8Z0TdaSGkeloJwFqkaQb4rtvkVn+sKs=
197+
github.com/komer3/linodego v0.0.0-20250225164824-67e4203f0cee/go.mod h1:nLGFio4pRwmz+RN7aF8rloHMzNY6anlIwIQ7QY/qQKY=
196198
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
197199
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
198200
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
@@ -201,8 +203,6 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0
201203
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
202204
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=
203205
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
204-
github.com/linode/linodego v1.47.0 h1:6MFNCyzWbr8Rhl4r7d5DwZLwxvFIsM4ARH6W0KS/R0U=
205-
github.com/linode/linodego v1.47.0/go.mod h1:vyklQRzZUWhFVBZdYx4dcYJU/gG9yKB9VUcUs6ub0Lk=
206206
github.com/mackerelio/go-osstat v0.2.5 h1:+MqTbZUhoIt4m8qzkVoXUJg1EuifwlAJSk4Yl2GXh+o=
207207
github.com/mackerelio/go-osstat v0.2.5/go.mod h1:atxwWF+POUZcdtR1wnsUcQxTytoHG4uhl2AKKzrOajY=
208208
github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM=
@@ -384,8 +384,8 @@ golang.org/x/crypto v0.0.0-20190422183909-d864b10871cd/go.mod h1:yigFU9vqHzYiE8U
384384
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
385385
golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
386386
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
387-
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
388-
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
387+
golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus=
388+
golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M=
389389
golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e h1:4qufH0hlUYs6AO6XmZC3GqfDPGSXHVXUFR6OND+iJX4=
390390
golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c=
391391
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
@@ -399,16 +399,16 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
399399
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
400400
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
401401
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
402-
golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
403-
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
404-
golang.org/x/oauth2 v0.25.0 h1:CY4y7XT9v0cRI9oupztF8AgiIu99L/ksR/Xp/6jrZ70=
405-
golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
402+
golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
403+
golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
404+
golang.org/x/oauth2 v0.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE=
405+
golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
406406
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
407407
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
408408
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
409409
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
410-
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
411-
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
410+
golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
411+
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
412412
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
413413
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
414414
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -420,15 +420,15 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc
420420
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
421421
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
422422
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
423-
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
424-
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
423+
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
424+
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
425425
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
426-
golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg=
427-
golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek=
426+
golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
427+
golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
428428
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
429429
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
430-
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
431-
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
430+
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
431+
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
432432
golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg=
433433
golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
434434
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func main() {
8484
command.Flags().BoolVar(&linode.Options.EnableTokenHealthChecker, "enable-token-health-checker", false, "enables Linode API token health checker")
8585
command.Flags().StringVar(&linode.Options.VPCName, "vpc-name", "", "[deprecated: use vpc-names instead] vpc name whose routes will be managed by route-controller")
8686
command.Flags().StringVar(&linode.Options.VPCNames, "vpc-names", "", "comma separated vpc names whose routes will be managed by route-controller")
87-
command.Flags().StringVar(&linode.Options.SubnetNames, "subnet-names", "", "comma separated subnet names whose routes will be managed by route-controller (requires vpc-names flag to also be set)")
87+
command.Flags().StringVar(&linode.Options.SubnetNames, "subnet-names", "default", "comma separated subnet names whose routes will be managed by route-controller (requires vpc-names flag to also be set)")
8888
command.Flags().StringVar(&linode.Options.LoadBalancerType, "load-balancer-type", "nodebalancer", "configures which type of load-balancing to use for LoadBalancer Services (options: nodebalancer, cilium-bgp)")
8989
command.Flags().StringVar(&linode.Options.BGPNodeSelector, "bgp-node-selector", "", "node selector to use to perform shared IP fail-over with BGP (e.g. cilium-bgp-peering=true")
9090
command.Flags().StringVar(&linode.Options.IpHolderSuffix, "ip-holder-suffix", "", "suffix to append to the ip holder name when using shared IP fail-over with BGP (e.g. ip-holder-suffix=my-cluster-name")

0 commit comments

Comments
 (0)