Skip to content

Commit

Permalink
add additional interface using machinetemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulait committed Apr 10, 2024
1 parent 24cb4f4 commit 4eeee6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 0 additions & 7 deletions controller/linodemachine_controller_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,6 @@ func (r *LinodeMachineReconciler) newCreateConfig(ctx context.Context, machineSc
createConfig.RootPass = uuid.NewString()
}

// add public interface to linode (eth0)
iface := linodego.InstanceConfigInterfaceCreateOptions{
Purpose: linodego.InterfacePurposePublic,
Primary: true,
}
createConfig.Interfaces = append(createConfig.Interfaces, iface)

// if vpc, attach additional interface to linode (eth1)
if machineScope.LinodeCluster.Spec.VPCRef != nil {
iface, err := r.getVPCInterfaceConfig(ctx, machineScope, createConfig.Interfaces, logger)
Expand Down
6 changes: 6 additions & 0 deletions templates/flavors/base/linodeMachineTemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ spec:
image: ${LINODE_OS:="linode/ubuntu22.04"}
type: ${LINODE_CONTROL_PLANE_MACHINE_TYPE}
region: ${LINODE_REGION}
interfaces:
- purpose: public
primary: true
authorizedKeys:
# uncomment to include your ssh key in linode provisioning
# - ${LINODE_SSH_PUBKEY:=""}
Expand All @@ -23,6 +26,9 @@ spec:
image: ${LINODE_OS:="linode/ubuntu22.04"}
type: ${LINODE_MACHINE_TYPE}
region: ${LINODE_REGION}
interfaces:
- purpose: public
primary: true
authorizedKeys:
# uncomment to include your ssh key in linode provisioning
# - ${LINODE_SSH_PUBKEY:=""}

0 comments on commit 4eeee6f

Please sign in to comment.