Skip to content

Commit

Permalink
Latest update fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rammanoj committed Jan 21, 2024
1 parent f1647f8 commit bec346a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cloud/linode/instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (i *instances) lookupLinode(ctx context.Context, node *v1.Node) (*linodego.
sentry.SetTag(ctx, "provider_id", providerID)
sentry.SetTag(ctx, "node_name", node.Name)

if providerID != "" && isLinodeProviderID(providerID){
if providerID != "" && isLinodeProviderID(providerID) {
id, err := parseProviderID(providerID)
if err != nil {
sentry.CaptureError(ctx, err)
Expand Down
2 changes: 1 addition & 1 deletion cloud/linode/loadbalancers.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func (l *loadbalancers) getNodeBalancerDeviceId(ctx context.Context, firewallID,
func (l *loadbalancers) updateNodeBalancerFirewall(ctx context.Context, service *v1.Service, nb *linodego.NodeBalancer) error {
var newFirewallID, existingFirewallID int
var err error
fwid, ok := getServiceAnnotation(service, annLinodeCloudFirewallID)
fwid, ok := service.GetAnnotations()[annLinodeCloudFirewallID]
if ok {
newFirewallID, err = strconv.Atoi(fwid)
if err != nil {
Expand Down
12 changes: 6 additions & 6 deletions cloud/linode/loadbalancers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ func testUpdateLoadBalancerAddNewFirewall(t *testing.T, client *linodego.Client,

svc := &v1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: randString(10),
Name: randString(),
UID: "foobar123",
Annotations: map[string]string{
annLinodeThrottle: "15",
Expand All @@ -771,7 +771,7 @@ func testUpdateLoadBalancerAddNewFirewall(t *testing.T, client *linodego.Client,
Spec: v1.ServiceSpec{
Ports: []v1.ServicePort{
{
Name: randString(10),
Name: randString(),
Protocol: "TCP",
Port: int32(80),
NodePort: int32(30000),
Expand Down Expand Up @@ -871,7 +871,7 @@ func testUpdateLoadBalancerUpdateFirewall(t *testing.T, client *linodego.Client,

svc := &v1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: randString(10),
Name: randString(),
UID: "foobar123",
Annotations: map[string]string{
annLinodeThrottle: "15",
Expand All @@ -880,7 +880,7 @@ func testUpdateLoadBalancerUpdateFirewall(t *testing.T, client *linodego.Client,
Spec: v1.ServiceSpec{
Ports: []v1.ServicePort{
{
Name: randString(10),
Name: randString(),
Protocol: "TCP",
Port: int32(80),
NodePort: int32(30000),
Expand Down Expand Up @@ -984,7 +984,7 @@ func testUpdateLoadBalancerDeleteFirewall(t *testing.T, client *linodego.Client,

svc := &v1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: randString(10),
Name: randString(),
UID: "foobar123",
Annotations: map[string]string{
annLinodeThrottle: "15",
Expand All @@ -993,7 +993,7 @@ func testUpdateLoadBalancerDeleteFirewall(t *testing.T, client *linodego.Client,
Spec: v1.ServiceSpec{
Ports: []v1.ServicePort{
{
Name: randString(10),
Name: randString(),
Protocol: "TCP",
Port: int32(80),
NodePort: int32(30000),
Expand Down

0 comments on commit bec346a

Please sign in to comment.