Skip to content

Commit a8c7ab3

Browse files
committed
Added default machine counts to templates and updated e2e tests to remove specified counts
1 parent a11c323 commit a8c7ab3

File tree

11 files changed

+8
-12
lines changed

11 files changed

+8
-12
lines changed

e2e/capl-cluster-flavors/kubeadm-capl-cluster/chainsaw-test.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ spec:
4242
clusterctl generate cluster $CLUSTER -n $NAMESPACE \
4343
--kubernetes-version ${KUBERNETES_VERSION} \
4444
--infrastructure local-linode:v0.0.0 \
45-
--control-plane-machine-count 1 --worker-machine-count 1 \
4645
--config ${CLUSTERCTL_CONFIG:=${HOME}/.cluster-api/clusterctl.yaml} > default-cluster.yaml
4746
check:
4847
($error == null): true

e2e/capl-cluster-flavors/kubeadm-flatcar-vpcless-capl-cluster/chainsaw-test.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ spec:
7979
clusterctl generate cluster $CLUSTER -n $NAMESPACE \
8080
--kubernetes-version ${KUBERNETES_VERSION} \
8181
--infrastructure local-linode:v0.0.0 \
82-
--control-plane-machine-count 1 --worker-machine-count 1 \
8382
--flavor kubeadm-flatcar \
8483
--config ${CLUSTERCTL_CONFIG:=${HOME}/.cluster-api/clusterctl.yaml} > flatcar-cluster.yaml
8584
check:

e2e/capl-cluster-flavors/kubeadm-full-capl-cluster/chainsaw-test.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ spec:
5555
clusterctl generate cluster $CLUSTER -n $NAMESPACE \
5656
--flavor kubeadm-full --kubernetes-version ${KUBERNETES_VERSION} \
5757
--infrastructure local-linode:v0.0.0 \
58-
--control-plane-machine-count 1 --worker-machine-count 1 \
5958
--config ${CLUSTERCTL_CONFIG:=${HOME}/.cluster-api/clusterctl.yaml} > kubeadm-full-cluster.yaml
6059
fi
6160
check:

e2e/capl-cluster-flavors/rke2-capl-cluster/chainsaw-test.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ spec:
3939
clusterctl generate cluster $CLUSTER -n $NAMESPACE \
4040
--flavor rke2 --kubernetes-version ${KUBERNETES_VERSION}+rke2r1 \
4141
--infrastructure local-linode:v0.0.0 \
42-
--control-plane-machine-count 1 --worker-machine-count 1 \
4342
--config ${CLUSTERCTL_CONFIG:=${HOME}/.cluster-api/clusterctl.yaml} > rke2-cluster.yaml
4443
check:
4544
($error == null): true

templates/addons/konnectivity/konnectivity.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ spec:
1717
valuesTemplate: |
1818
proxyServerHost: {{ .InfraCluster.spec.controlPlaneEndpoint.host }}
1919
proxyServerPort: ${KONNECTIVITY_PORT:=8132}
20-
serverCount: ${CONTROL_PLANE_MACHINE_COUNT}
20+
serverCount: ${CONTROL_PLANE_MACHINE_COUNT:=1}
2121
agentReplicas: ${KONNECTIVITY_AGENT_REPLICAS:=3}

templates/flavors/clusterclass-kubeadm/cluster-template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ spec:
2222
- name: workerMachineType
2323
value: ${LINODE_MACHINE_TYPE}
2424
controlPlane:
25-
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
25+
replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1}
2626
workers:
2727
machineDeployments:
2828
- class: default-worker
2929
name: md-0
30-
replicas: ${WORKER_MACHINE_COUNT}
30+
replicas: ${WORKER_MACHINE_COUNT:=1}

templates/flavors/k3s/default/k3sControlPlane.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,5 @@ spec:
7272
- sed -i '/swap/d' /etc/fstab
7373
- swapoff -a
7474
- hostnamectl set-hostname '{{ ds.meta_data.label }}' && hostname -F /etc/hostname
75-
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
75+
replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1}
7676
version: ${KUBERNETES_VERSION}

templates/flavors/kubeadm/default/kubeadmControlPlane.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apiVersion: controlplane.cluster.x-k8s.io/v1beta1
44
metadata:
55
name: ${CLUSTER_NAME}-control-plane
66
spec:
7-
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
7+
replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1}
88
machineTemplate:
99
infrastructureRef:
1010
kind: LinodeMachineTemplate

templates/flavors/kubeadm/flatcar/patch-flatcar.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kind: KubeadmControlPlane
44
metadata:
55
name: "${CLUSTER_NAME}-control-plane"
66
spec:
7-
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
7+
replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1}
88
kubeadmConfigSpec:
99
joinConfiguration:
1010
nodeRegistration:

templates/flavors/rke2/default/rke2ControlPlane.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ spec:
3030
- sed -i '/swap/d' /etc/fstab
3131
- swapoff -a
3232
- hostnamectl set-hostname '{{ ds.meta_data.label }}' && hostname -F /etc/hostname
33-
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
33+
replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1}

templates/infra/machineDeployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
name: ${CLUSTER_NAME}-md-0
66
spec:
77
clusterName: ${CLUSTER_NAME}
8-
replicas: ${WORKER_MACHINE_COUNT}
8+
replicas: ${WORKER_MACHINE_COUNT:=1}
99
selector:
1010
matchLabels:
1111
template:

0 commit comments

Comments
 (0)