Skip to content

Commit 8967013

Browse files
committed
rename annotation variable
1 parent fd2ff3f commit 8967013

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

cloud/annotations/annotations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const (
2727

2828
// AnnLinodeLoadBalancerIPv4 is the annotation used to specify a reserved IPv4 address
2929
// for the NodeBalancer. If not specified, Linode will automatically assign an IPv4 address.
30-
AnnLinodeLoadBalancerIPv4 = "service.beta.kubernetes.io/linode-loadbalancer-reserved-ipv4"
30+
AnnLinodeLoadBalancerReservedIPv4 = "service.beta.kubernetes.io/linode-loadbalancer-reserved-ipv4"
3131

3232
AnnLinodeLoadBalancerPreserve = "service.beta.kubernetes.io/linode-loadbalancer-preserve"
3333
AnnLinodeNodeBalancerID = "service.beta.kubernetes.io/linode-loadbalancer-nodebalancer-id"

cloud/linode/loadbalancers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ func (l *loadbalancers) updateNodeBalancer(
399399
}
400400

401401
// Check for IPv4 annotation change
402-
if ipv4, ok := service.GetAnnotations()[annotations.AnnLinodeLoadBalancerIPv4]; ok && ipv4 != *nb.IPv4 {
402+
if ipv4, ok := service.GetAnnotations()[annotations.AnnLinodeLoadBalancerReservedIPv4]; ok && ipv4 != *nb.IPv4 {
403403
// Log the error in the CCM's logfile
404404
klog.Warningf("IPv4 annotation has changed for service (%s) from %s to %s, but NodeBalancer (%d) IP cannot be updated after creation",
405405
getServiceNn(service), *nb.IPv4, ipv4, nb.ID)
@@ -875,7 +875,7 @@ func (l *loadbalancers) createNodeBalancer(ctx context.Context, clusterName stri
875875
}
876876

877877
// Check for static IPv4 address annotation
878-
if ipv4, ok := service.GetAnnotations()[annotations.AnnLinodeLoadBalancerIPv4]; ok {
878+
if ipv4, ok := service.GetAnnotations()[annotations.AnnLinodeLoadBalancerReservedIPv4]; ok {
879879
createOpts.IPv4 = &ipv4
880880
}
881881

cloud/linode/loadbalancers_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ func testCreateNodeBalancerWithReservedIP(t *testing.T, client *linodego.Client,
459459
t.Helper()
460460

461461
annMap := map[string]string{
462-
annotations.AnnLinodeLoadBalancerIPv4: "156.1.1.101",
462+
annotations.AnnLinodeLoadBalancerReservedIPv4: "156.1.1.101",
463463
}
464464
err := testCreateNodeBalancer(t, client, f, annMap, nil)
465465
if err != nil {
@@ -3073,7 +3073,7 @@ func testUpdateLoadBalancerAddReservedIP(t *testing.T, client *linodego.Client,
30733073

30743074
stubService(fakeClientset, svc)
30753075
svc.SetAnnotations(map[string]string{
3076-
annotations.AnnLinodeLoadBalancerIPv4: ipaddr.Address,
3076+
annotations.AnnLinodeLoadBalancerReservedIPv4: ipaddr.Address,
30773077
})
30783078

30793079
err = lb.UpdateLoadBalancer(t.Context(), "", svc, nodes)

cloud/nodeipam/ipam/cloud_allocator.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ type cloudAllocator struct {
7373
}
7474

7575
const (
76-
providerIDPrefix = "linode://"
77-
ipv6BitLen = 128
78-
ipv6PodCIDRMaskSize = 112
76+
providerIDPrefix = "linode://"
77+
ipv6BitLen = 128
78+
ipv6PodCIDRMaskSize = 112
7979
)
8080

8181
var _ CIDRAllocator = &cloudAllocator{}

0 commit comments

Comments
 (0)