Skip to content

Commit 7f7d110

Browse files
author
Joshua Reed
committed
Close to v1beta2 e2e tests working.
1 parent 95d2b13 commit 7f7d110

File tree

45 files changed

+344
-782
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+344
-782
lines changed

test/e2e/config/cloudstack.yaml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -73,27 +73,27 @@ providers:
7373
- name: cloudstack
7474
type: InfrastructureProvider
7575
files:
76-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template.yaml"
77-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-invalid-zone.yaml"
78-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-invalid-account.yaml"
79-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-invalid-domain.yaml"
80-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-invalid-template.yaml"
81-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-invalid-cp-offering.yaml"
82-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-insufficient-compute-resources.yaml"
83-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-insufficient-compute-resources-for-upgrade.yaml"
84-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-node-drain.yaml"
85-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-machine-remediation.yaml"
86-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-affinity-group-pro.yaml"
87-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-affinity-group-anti.yaml"
88-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-resource-cleanup.yaml"
89-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-second-cluster.yaml"
90-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-shared-network-kubevip.yaml"
91-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-invalid-disk-offering.yaml"
92-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-invalid-disk-offering-size-for-non-customized.yaml"
93-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-invalid-disk-offering-size-for-customized.yaml"
94-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-disk-offering.yaml"
95-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-custom-disk-offering.yaml"
96-
- sourcePath: "../data/infrastructure-cloudstack/v1beta1/cluster-template-subdomain.yaml"
76+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template.yaml"
77+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-invalid-zone.yaml"
78+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-invalid-account.yaml"
79+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-invalid-domain.yaml"
80+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-invalid-template.yaml"
81+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-invalid-cp-offering.yaml"
82+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-insufficient-compute-resources.yaml"
83+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-insufficient-compute-resources-for-upgrade.yaml"
84+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-node-drain.yaml"
85+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-machine-remediation.yaml"
86+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-affinity-group-pro.yaml"
87+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-affinity-group-anti.yaml"
88+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-resource-cleanup.yaml"
89+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-second-cluster.yaml"
90+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-shared-network-kubevip.yaml"
91+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-invalid-disk-offering.yaml"
92+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-invalid-disk-offering-size-for-non-customized.yaml"
93+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-invalid-disk-offering-size-for-customized.yaml"
94+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-disk-offering.yaml"
95+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-custom-disk-offering.yaml"
96+
- sourcePath: "../data/infrastructure-cloudstack/v1beta2/cluster-template-subdomain.yaml"
9797
- sourcePath: "../data/shared/v1beta1/metadata.yaml"
9898
versions:
9999
- name: v1.0.0
@@ -112,6 +112,8 @@ variables:
112112
IP_FAMILY: "IPv4"
113113
NODE_DRAIN_TIMEOUT: "60s"
114114

115+
CLOUDSTACK_FD1_NAME: "FD1"
116+
CLOUDSTACK_FD1_SECRET_NAME: "Secret1"
115117
CLOUDSTACK_ZONE_NAME: zone1
116118
CLOUDSTACK_INVALID_ZONE_NAME: zoneXXXX
117119
CLOUDSTACK_INVALID_NETWORK_NAME: networkXXXX

test/e2e/data/infrastructure-cloudstack/v1beta2/bases/cluster-with-kcp.yaml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,31 @@ spec:
1010
- 192.168.0.0/16
1111
serviceDomain: "cluster.local"
1212
infrastructureRef:
13-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
13+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
1414
kind: CloudStackCluster
1515
name: ${CLUSTER_NAME}
1616
controlPlaneRef:
1717
kind: KubeadmControlPlane
1818
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
1919
name: ${CLUSTER_NAME}-control-plane
2020
---
21-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
21+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
2222
kind: CloudStackCluster
2323
metadata:
2424
name: ${CLUSTER_NAME}
2525
spec:
26-
zones:
27-
- name : ${CLOUDSTACK_ZONE_NAME}
28-
network:
29-
name: ${CLOUDSTACK_NETWORK_NAME}
3026
controlPlaneEndpoint:
3127
host: ""
3228
port: 6443
29+
failureDomains:
30+
- name: ${CLOUDSTACK_FD1_NAME}
31+
zone:
32+
name : ${CLOUDSTACK_ZONE_NAME}
33+
network:
34+
name: ${CLOUDSTACK_NETWORK_NAME}
35+
acsendpoint:
36+
name: ${CLOUDSTACK_FD1_SECRET_NAME}
37+
namespace: default
3338
---
3439
kind: KubeadmControlPlane
3540
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
@@ -41,25 +46,25 @@ spec:
4146
nodeRegistration:
4247
name: '{{ local_hostname }}'
4348
kubeletExtraArgs:
44-
provider-id: cloudstack:///'{{ ds.meta_data.instance_id }}'
49+
provider-id: "cloudstack:///'{{ ds.meta_data.instance_id }}'"
4550
clusterConfiguration:
4651
imageRepository: k8s.gcr.io
4752
joinConfiguration:
4853
nodeRegistration:
4954
name: '{{ local_hostname }}'
5055
kubeletExtraArgs:
51-
provider-id: cloudstack:///'{{ ds.meta_data.instance_id }}'
56+
provider-id: "cloudstack:///'{{ ds.meta_data.instance_id }}'"
5257
preKubeadmCommands:
5358
- swapoff -a
5459
machineTemplate:
5560
infrastructureRef:
56-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
61+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
5762
kind: CloudStackMachineTemplate
5863
name: ${CLUSTER_NAME}-control-plane
5964
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
6065
version: ${KUBERNETES_VERSION}
6166
---
62-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
67+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
6368
kind: CloudStackMachineTemplate
6469
metadata:
6570
name: ${CLUSTER_NAME}-control-plane
@@ -71,4 +76,4 @@ spec:
7176
template:
7277
name: ${CLOUDSTACK_TEMPLATE_NAME}
7378
sshKey: ${CLOUDSTACK_SSH_KEY_NAME}
74-
---
79+
---

test/e2e/data/infrastructure-cloudstack/v1beta2/bases/md.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ spec:
1919
kind: KubeadmConfigTemplate
2020
infrastructureRef:
2121
name: "${CLUSTER_NAME}-md-0"
22-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
22+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
2323
kind: CloudStackMachineTemplate
2424
---
25-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
25+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
2626
kind: CloudStackMachineTemplate
2727
metadata:
2828
name: ${CLUSTER_NAME}-md-0
@@ -46,6 +46,6 @@ spec:
4646
nodeRegistration:
4747
name: '{{ local_hostname }}'
4848
kubeletExtraArgs:
49-
provider-id: cloudstack:///'{{ ds.meta_data.instance_id }}'
49+
provider-id: "cloudstack:///'{{ ds.meta_data.instance_id }}'"
5050
preKubeadmCommands:
51-
- swapoff -a
51+
- swapoff -a

test/e2e/data/infrastructure-cloudstack/v1beta2/cluster-template-affinity-group-anti.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
joinConfiguration:
99
nodeRegistration:
1010
kubeletExtraArgs:
11-
provider-id: "cloudstack:///'{{ ds.meta_data.instance_id }}'"
11+
provider-id: cloudstack:///'{{ ds.meta_data.instance_id }}'
1212
name: '{{ local_hostname }}'
1313
preKubeadmCommands:
1414
- swapoff -a
@@ -28,7 +28,7 @@ spec:
2828
kind: KubeadmControlPlane
2929
name: ${CLUSTER_NAME}-control-plane
3030
infrastructureRef:
31-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
31+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
3232
kind: CloudStackCluster
3333
name: ${CLUSTER_NAME}
3434
---
@@ -50,7 +50,7 @@ spec:
5050
name: ${CLUSTER_NAME}-md-0
5151
clusterName: ${CLUSTER_NAME}
5252
infrastructureRef:
53-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
53+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
5454
kind: CloudStackMachineTemplate
5555
name: ${CLUSTER_NAME}-md-0
5656
version: ${KUBERNETES_VERSION}
@@ -66,18 +66,18 @@ spec:
6666
initConfiguration:
6767
nodeRegistration:
6868
kubeletExtraArgs:
69-
provider-id: "cloudstack:///'{{ ds.meta_data.instance_id }}'"
69+
provider-id: cloudstack:///'{{ ds.meta_data.instance_id }}'
7070
name: '{{ local_hostname }}'
7171
joinConfiguration:
7272
nodeRegistration:
7373
kubeletExtraArgs:
74-
provider-id: "cloudstack:///'{{ ds.meta_data.instance_id }}'"
74+
provider-id: cloudstack:///'{{ ds.meta_data.instance_id }}'
7575
name: '{{ local_hostname }}'
7676
preKubeadmCommands:
7777
- swapoff -a
7878
machineTemplate:
7979
infrastructureRef:
80-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
80+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
8181
kind: CloudStackMachineTemplate
8282
name: ${CLUSTER_NAME}-control-plane
8383
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
@@ -94,12 +94,12 @@ spec:
9494
failureDomains:
9595
- name: ${CLOUDSTACK_FD1_NAME}
9696
zone:
97-
name : ${CLOUDSTACK_ZONE_NAME}
98-
network:
99-
name: ${CLOUDSTACK_NETWORK_NAME}
10097
acsendpoint:
10198
name: ${CLOUDSTACK_FD1_SECRET_NAME}
10299
namespace: default
100+
name: ${CLOUDSTACK_ZONE_NAME}
101+
network:
102+
name: ${CLOUDSTACK_NETWORK_NAME}
103103
---
104104
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
105105
kind: CloudStackMachineTemplate

test/e2e/data/infrastructure-cloudstack/v1beta2/cluster-template-affinity-group-anti/md.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
2+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
33
kind: CloudStackMachineTemplate
44
metadata:
55
name: ${CLUSTER_NAME}-control-plane
@@ -13,7 +13,7 @@ spec:
1313
sshKey: ${CLOUDSTACK_SSH_KEY_NAME}
1414
affinity: anti
1515
---
16-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
16+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
1717
kind: CloudStackMachineTemplate
1818
metadata:
1919
name: ${CLUSTER_NAME}-md-0

test/e2e/data/infrastructure-cloudstack/v1beta2/cluster-template-affinity-group-pro.yaml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
kind: KubeadmControlPlane
2929
name: ${CLUSTER_NAME}-control-plane
3030
infrastructureRef:
31-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
31+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
3232
kind: CloudStackCluster
3333
name: ${CLUSTER_NAME}
3434
---
@@ -50,7 +50,7 @@ spec:
5050
name: ${CLUSTER_NAME}-md-0
5151
clusterName: ${CLUSTER_NAME}
5252
infrastructureRef:
53-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
53+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
5454
kind: CloudStackMachineTemplate
5555
name: ${CLUSTER_NAME}-md-0
5656
version: ${KUBERNETES_VERSION}
@@ -77,26 +77,31 @@ spec:
7777
- swapoff -a
7878
machineTemplate:
7979
infrastructureRef:
80-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
80+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
8181
kind: CloudStackMachineTemplate
8282
name: ${CLUSTER_NAME}-control-plane
8383
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
8484
version: ${KUBERNETES_VERSION}
8585
---
86-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
86+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
8787
kind: CloudStackCluster
8888
metadata:
8989
name: ${CLUSTER_NAME}
9090
spec:
9191
controlPlaneEndpoint:
9292
host: ""
9393
port: 6443
94-
zones:
95-
- name: ${CLOUDSTACK_ZONE_NAME}
96-
network:
97-
name: ${CLOUDSTACK_NETWORK_NAME}
94+
failureDomains:
95+
- name: ${CLOUDSTACK_FD1_NAME}
96+
zone:
97+
acsendpoint:
98+
name: ${CLOUDSTACK_FD1_SECRET_NAME}
99+
namespace: default
100+
name: ${CLOUDSTACK_ZONE_NAME}
101+
network:
102+
name: ${CLOUDSTACK_NETWORK_NAME}
98103
---
99-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
104+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
100105
kind: CloudStackMachineTemplate
101106
metadata:
102107
name: ${CLUSTER_NAME}-control-plane
@@ -110,7 +115,7 @@ spec:
110115
template:
111116
name: ${CLOUDSTACK_TEMPLATE_NAME}
112117
---
113-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
118+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
114119
kind: CloudStackMachineTemplate
115120
metadata:
116121
name: ${CLUSTER_NAME}-md-0

test/e2e/data/infrastructure-cloudstack/v1beta2/cluster-template-affinity-group-pro/md.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
2+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
33
kind: CloudStackMachineTemplate
44
metadata:
55
name: ${CLUSTER_NAME}-control-plane
@@ -13,7 +13,7 @@ spec:
1313
sshKey: ${CLOUDSTACK_SSH_KEY_NAME}
1414
affinity: pro
1515
---
16-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
16+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
1717
kind: CloudStackMachineTemplate
1818
metadata:
1919
name: ${CLUSTER_NAME}-md-0

0 commit comments

Comments
 (0)