Skip to content

Commit bcb9e59

Browse files
committed
you would think this disables netwrok helper on the machine create request. It does not
1 parent ad3758e commit bcb9e59

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/controller/linodemachine_controller_helpers.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,14 @@ func fillCreateConfig(createConfig *linodego.InstanceCreateOptions, machineScope
8484
if machineScope.LinodeMachine.Spec.PrivateIP != nil {
8585
createConfig.PrivateIP = *machineScope.LinodeMachine.Spec.PrivateIP
8686
} else {
87-
// LinodeInterfaces doesn't support PrivateIP field so only set PrivateIP if we aren't using LinodeInterfaces
8887
if machineScope.LinodeMachine.Spec.LinodeInterfaces == nil {
88+
// Supported only for legacy network interfaces.
8989
createConfig.PrivateIP = true
90+
} else {
91+
// Network Helper is not supported for the new network interfaces.
92+
createConfig.NetworkHelper = ptr.To(false)
9093
}
94+
9195
}
9296

9397
if createConfig.Tags == nil {
@@ -1056,6 +1060,7 @@ func linodeMachineSpecToInstanceCreateConfig(machineSpec infrav1alpha2.LinodeMac
10561060
if len(machineSpec.LinodeInterfaces) > 0 {
10571061
instCreateOpts.LinodeInterfaces = constructLinodeInterfaceCreateOpts(machineSpec.LinodeInterfaces)
10581062
instCreateOpts.InterfaceGeneration = linodego.GenerationLinode
1063+
instCreateOpts.NetworkHelper = ptr.To(false)
10591064
} else {
10601065
interfaces := make([]linodego.InstanceConfigInterfaceCreateOptions, len(machineSpec.Interfaces))
10611066
for idx, iface := range machineSpec.Interfaces {

0 commit comments

Comments
 (0)