Skip to content

Commit 86831ae

Browse files
committed
update fields for linodego changes
1 parent a21a543 commit 86831ae

3 files changed

Lines changed: 16 additions & 14 deletions

File tree

config/crd/bases/infrastructure.cluster.x-k8s.io_linodevpcs.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ spec:
7474
Once ranges are allocated based on the IPv6Range field, they will be
7575
added to this field.
7676
items:
77-
description: VPCIPv6Range represents a single IPv6 range assigned
78-
to a VPC.
77+
description: |-
78+
VPCIPv6Range represents a single IPv6 range assigned to a VPC.
79+
NOTE: IPv6 VPCs may not currently be available to all users.
7980
properties:
8081
range:
8182
type: string
@@ -132,8 +133,9 @@ spec:
132133
Once ranges are allocated based on the IPv6Range field, they will be
133134
added to this field.
134135
items:
135-
description: VPCIPv6Range represents a single IPv6 range assigned
136-
to a VPC.
136+
description: |-
137+
VPCIPv6Range represents a single IPv6 range assigned to a VPC.
138+
NOTE: IPv6 VPCs may not currently be available to all users.
137139
properties:
138140
range:
139141
type: string

internal/controller/linodemachine_controller_helpers.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ func getVPCLinodeInterfaceConfig(ctx context.Context, machineScope *scope.Machin
675675
Addresses: []linodego.VPCInterfaceIPv4AddressCreateOptions{{
676676
Primary: ptr.To(true),
677677
NAT1To1Address: ptr.To("auto"),
678-
Address: "auto",
678+
Address: ptr.To("auto"),
679679
}},
680680
},
681681
},
@@ -760,7 +760,7 @@ func getVPCLinodeInterfaceConfigFromDirectID(ctx context.Context, machineScope *
760760
Addresses: []linodego.VPCInterfaceIPv4AddressCreateOptions{{
761761
Primary: ptr.To(true),
762762
NAT1To1Address: ptr.To("auto"),
763-
Address: "auto",
763+
Address: ptr.To("auto"),
764764
}},
765765
},
766766
},
@@ -953,7 +953,7 @@ func constructLinodeInterfaceCreateOpts(createOpts []infrav1alpha2.LinodeInterfa
953953
IPv6: iface.DefaultRoute.IPv6,
954954
}
955955
}
956-
ifaceCreateOpts.FirewallID = iface.FirewallID
956+
ifaceCreateOpts.FirewallID = ptr.To(iface.FirewallID)
957957
// createOpts is now fully populated with the interface options
958958
linodeInterfaces[idx] = ifaceCreateOpts
959959
}
@@ -973,7 +973,7 @@ func constructLinodeInterfaceVPC(iface infrav1alpha2.LinodeInterfaceCreateOption
973973
if iface.VPC.IPv4 != nil {
974974
for _, addr := range iface.VPC.IPv4.Addresses {
975975
ipv4Addrs = append(ipv4Addrs, linodego.VPCInterfaceIPv4AddressCreateOptions{
976-
Address: addr.Address,
976+
Address: ptr.To(addr.Address),
977977
Primary: addr.Primary,
978978
NAT1To1Address: addr.NAT1To1Address,
979979
})
@@ -989,7 +989,7 @@ func constructLinodeInterfaceVPC(iface infrav1alpha2.LinodeInterfaceCreateOption
989989
{
990990
Primary: ptr.To(true),
991991
NAT1To1Address: ptr.To("auto"),
992-
Address: "auto", // Default to auto-assigned address
992+
Address: ptr.To("auto"), // Default to auto-assigned address
993993
},
994994
}
995995
}
@@ -1029,7 +1029,7 @@ func constructLinodeInterfacePublic(iface infrav1alpha2.LinodeInterfaceCreateOpt
10291029
if iface.Public.IPv4 != nil {
10301030
for _, addr := range iface.Public.IPv4.Addresses {
10311031
ipv4Addrs = append(ipv4Addrs, linodego.PublicInterfaceIPv4AddressCreateOptions{
1032-
Address: addr.Address,
1032+
Address: ptr.To(addr.Address),
10331033
Primary: addr.Primary,
10341034
})
10351035
}
@@ -1518,7 +1518,7 @@ func configureFirewall(ctx context.Context, machineScope *scope.MachineScope, cr
15181518

15191519
// If using LinodeInterfaces that needs to know about the firewall ID
15201520
for i := range createConfig.LinodeInterfaces {
1521-
createConfig.LinodeInterfaces[i].FirewallID = ptr.To(fwID)
1521+
createConfig.LinodeInterfaces[i].FirewallID = ptr.To(ptr.To(fwID))
15221522
}
15231523

15241524
return nil

internal/controller/linodemachine_controller_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2746,7 +2746,7 @@ var _ = Describe("machine in VPC with new network interfaces", Label("machine",
27462746
Addresses: []linodego.VPCInterfaceIPv4AddressCreateOptions{{
27472747
NAT1To1Address: ptr.To("auto"),
27482748
Primary: ptr.To(true),
2749-
Address: "auto",
2749+
Address: ptr.To("auto"),
27502750
}},
27512751
},
27522752
},
@@ -2813,7 +2813,7 @@ var _ = Describe("machine in VPC with new network interfaces", Label("machine",
28132813
Addresses: []linodego.VPCInterfaceIPv4AddressCreateOptions{{
28142814
NAT1To1Address: ptr.To("auto"),
28152815
Primary: ptr.To(true),
2816-
Address: "auto",
2816+
Address: ptr.To("auto"),
28172817
}},
28182818
},
28192819
},
@@ -2886,7 +2886,7 @@ var _ = Describe("machine in VPC with new network interfaces", Label("machine",
28862886
Addresses: []linodego.VPCInterfaceIPv4AddressCreateOptions{{
28872887
NAT1To1Address: ptr.To("auto"),
28882888
Primary: ptr.To(true),
2889-
Address: "auto",
2889+
Address: ptr.To("auto"),
28902890
}},
28912891
},
28922892
},

0 commit comments

Comments
 (0)