Skip to content

Commit 43e0661

Browse files
committed
review fixes
1 parent 06d1bd9 commit 43e0661

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

internal/controller/cloudscalemachine_server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ func (r *CloudscaleMachineReconciler) buildInterfaceRequests(machineScope *scope
295295
}
296296
firstNetwork := machineScope.CloudscaleCluster.Status.Networks[0]
297297
return &[]cloudscalesdk.InterfaceRequest{
298-
{Network: firstNetwork.NetworkID},
299298
{Network: InterfaceTypePublic},
299+
{Network: firstNetwork.NetworkID},
300300
}, nil, nil
301301
}
302302

internal/controller/cloudscalemachine_server_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ func TestReconcileServer_NoServerGroupWhenStatusEmpty(t *testing.T) {
612612

613613
// --- buildInterfaceRequests tests ---
614614

615-
func TestBuildInterfaceRequests_DefaultsToFirstNetworkPlusPublic(t *testing.T) {
615+
func TestBuildInterfaceRequests_DefaultsToPublicPlusFirstNetwork(t *testing.T) {
616616
g := NewWithT(t)
617617

618618
machineScope := newTestMachineScopeWithServer(&mockServerService{})
@@ -625,8 +625,8 @@ func TestBuildInterfaceRequests_DefaultsToFirstNetworkPlusPublic(t *testing.T) {
625625
g.Expect(err).ToNot(HaveOccurred())
626626
g.Expect(reqs).ToNot(BeNil())
627627
g.Expect(*reqs).To(HaveLen(2))
628-
g.Expect((*reqs)[0].Network).To(Equal("net-uuid-123"))
629-
g.Expect((*reqs)[1].Network).To(Equal(InterfaceTypePublic))
628+
g.Expect((*reqs)[0].Network).To(Equal(InterfaceTypePublic))
629+
g.Expect((*reqs)[1].Network).To(Equal("net-uuid-123"))
630630
g.Expect(ipFamily).To(BeNil(), "runtime default path should not return ipFamily")
631631
}
632632

templates/cluster-template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
region: "${CLOUDSCALE_REGION}"
4040
networks:
4141
- name: "${CLUSTER_NAME}"
42-
cidr: "10.100.0.0/24"
42+
cidr: "10.0.0.0/24"
4343
gatewayAddress: "" # disable gateway, use public interface for internet access
4444
credentialsRef:
4545
name: "${CLUSTER_NAME}-credentials"

0 commit comments

Comments
 (0)