Skip to content

Commit 7ef8fa5

Browse files
committed
add clusterclass e2e test
1 parent efc37fd commit 7ef8fa5

11 files changed

+6076
-0
lines changed

templates/test/ci/cluster-template-prow-clusterclass-ci-default.yaml

Lines changed: 598 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/test/ci/cluster-template-prow-topology.yaml

Lines changed: 4762 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
apiVersion: cluster.x-k8s.io/v1beta1
2+
kind: ClusterClass
3+
metadata:
4+
name: ci-default
5+
spec:
6+
controlPlane:
7+
ref:
8+
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
9+
kind: KubeadmControlPlaneTemplate
10+
name: ci-default-kubeadm-control-plane
11+
machineInfrastructure:
12+
ref:
13+
kind: AzureMachineTemplate
14+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
15+
name: ci-default-control-plane
16+
infrastructure:
17+
ref:
18+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
19+
kind: AzureClusterTemplate
20+
name: ci-default-azure-cluster
21+
workers:
22+
machineDeployments:
23+
- class: ci-default-worker
24+
template:
25+
bootstrap:
26+
ref:
27+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
28+
kind: KubeadmConfigTemplate
29+
name: ci-default-worker
30+
infrastructure:
31+
ref:
32+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
33+
kind: AzureMachineTemplate
34+
name: ci-default-worker
35+
machineHealthCheck:
36+
maxUnhealthy: 100%
37+
unhealthyConditions:
38+
- type: E2ENodeUnhealthy
39+
status: "True"
40+
timeout: 30s
41+
- class: ci-default-worker-win
42+
template:
43+
bootstrap:
44+
ref:
45+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
46+
kind: KubeadmConfigTemplate
47+
name: ci-default-worker-win
48+
infrastructure:
49+
ref:
50+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
51+
kind: AzureMachineTemplate
52+
name: ci-default-worker-win
53+
machineHealthCheck:
54+
maxUnhealthy: 100%
55+
unhealthyConditions:
56+
- type: E2ENodeUnhealthy
57+
status: "True"
58+
timeout: 30s
59+
---
60+
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
61+
kind: KubeadmControlPlaneTemplate
62+
metadata:
63+
name: ci-default-kubeadm-control-plane
64+
spec:
65+
template:
66+
spec:
67+
kubeadmConfigSpec:
68+
clusterConfiguration:
69+
apiServer:
70+
extraArgs:
71+
cloud-config: /etc/kubernetes/azure.json
72+
cloud-provider: azure
73+
extraVolumes:
74+
- hostPath: /etc/kubernetes/azure.json
75+
mountPath: /etc/kubernetes/azure.json
76+
name: cloud-config
77+
readOnly: true
78+
timeoutForControlPlane: 20m
79+
controllerManager:
80+
extraArgs:
81+
allocate-node-cidrs: "false"
82+
cloud-config: /etc/kubernetes/azure.json
83+
cloud-provider: azure
84+
extraVolumes:
85+
- hostPath: /etc/kubernetes/azure.json
86+
mountPath: /etc/kubernetes/azure.json
87+
name: cloud-config
88+
readOnly: true
89+
etcd:
90+
local:
91+
dataDir: /var/lib/etcddisk/etcd
92+
extraArgs:
93+
quota-backend-bytes: "8589934592"
94+
diskSetup:
95+
filesystems:
96+
- device: /dev/disk/azure/scsi1/lun0
97+
extraOpts:
98+
- -E
99+
- lazy_itable_init=1,lazy_journal_init=1
100+
filesystem: ext4
101+
label: etcd_disk
102+
- device: ephemeral0.1
103+
filesystem: ext4
104+
label: ephemeral0
105+
replaceFS: ntfs
106+
partitions:
107+
- device: /dev/disk/azure/scsi1/lun0
108+
layout: true
109+
overwrite: false
110+
tableType: gpt
111+
files:
112+
- contentFrom:
113+
secret:
114+
key: control-plane-azure.json
115+
name: replace_me
116+
owner: root:root
117+
path: /etc/kubernetes/azure.json
118+
permissions: "0644"
119+
initConfiguration:
120+
nodeRegistration:
121+
kubeletExtraArgs:
122+
azure-container-registry-config: /etc/kubernetes/azure.json
123+
cloud-config: /etc/kubernetes/azure.json
124+
cloud-provider: azure
125+
name: '{{ ds.meta_data["local_hostname"] }}'
126+
joinConfiguration:
127+
nodeRegistration:
128+
kubeletExtraArgs:
129+
azure-container-registry-config: /etc/kubernetes/azure.json
130+
cloud-config: /etc/kubernetes/azure.json
131+
cloud-provider: azure
132+
name: '{{ ds.meta_data["local_hostname"] }}'
133+
mounts:
134+
- - LABEL=etcd_disk
135+
- /var/lib/etcddisk
136+
postKubeadmCommands: [ ]
137+
preKubeadmCommands: [ ]
138+
---
139+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
140+
kind: AzureClusterTemplate
141+
metadata:
142+
name: ci-default-azure-cluster
143+
spec:
144+
template:
145+
spec:
146+
additionalTags:
147+
replace_me_key: replace_me_val
148+
identityRef:
149+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
150+
kind: AzureClusterIdentity
151+
location: replace_me
152+
networkSpec:
153+
subnets:
154+
- role: control-plane
155+
- natGateway:
156+
name: node-natgateway
157+
role: node
158+
---
159+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
160+
kind: AzureMachineTemplate
161+
metadata:
162+
name: ci-default-control-plane
163+
spec:
164+
template:
165+
spec:
166+
dataDisks:
167+
- diskSizeGB: 256
168+
lun: 0
169+
nameSuffix: etcddisk
170+
osDisk:
171+
diskSizeGB: 128
172+
osType: Linux
173+
sshPublicKey: ""
174+
vmSize: replace_me
175+
---
176+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
177+
kind: KubeadmConfigTemplate
178+
metadata:
179+
name: ci-default-worker
180+
spec:
181+
template:
182+
spec:
183+
files:
184+
- contentFrom:
185+
secret:
186+
key: worker-node-azure.json
187+
name: replace_me
188+
owner: root:root
189+
path: /etc/kubernetes/azure.json
190+
permissions: "0644"
191+
joinConfiguration:
192+
nodeRegistration:
193+
kubeletExtraArgs:
194+
azure-container-registry-config: /etc/kubernetes/azure.json
195+
cloud-config: /etc/kubernetes/azure.json
196+
cloud-provider: azure
197+
name: '{{ ds.meta_data["local_hostname"] }}'
198+
preKubeadmCommands: [ ]
199+
---
200+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
201+
kind: AzureMachineTemplate
202+
metadata:
203+
name: ci-default-worker
204+
spec:
205+
template:
206+
spec:
207+
osDisk:
208+
diskSizeGB: 128
209+
osType: Linux
210+
sshPublicKey: ""
211+
vmSize: replace_me
212+
---
213+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
214+
kind: KubeadmConfigTemplate
215+
metadata:
216+
name: ci-default-worker-win
217+
spec:
218+
template:
219+
spec:
220+
preKubeadmCommands: []
221+
postKubeadmCommands:
222+
- nssm set kubelet start SERVICE_AUTO_START
223+
- powershell C:/defender-exclude-calico.ps1
224+
joinConfiguration:
225+
nodeRegistration:
226+
name: '{{ ds.meta_data["local_hostname"] }}'
227+
criSocket: npipe:////./pipe/containerd-containerd
228+
kubeletExtraArgs:
229+
cloud-provider: azure
230+
cloud-config: 'c:/k/azure.json'
231+
azure-container-registry-config: 'c:/k/azure.json'
232+
feature-gates: "WindowsHostProcessContainers=true"
233+
v: "2"
234+
windows-priorityclass: "ABOVE_NORMAL_PRIORITY_CLASS"
235+
files:
236+
- contentFrom:
237+
secret:
238+
key: worker-node-azure.json
239+
name: replace_me
240+
owner: root:root
241+
path: c:/k/azure.json
242+
permissions: "0644"
243+
- path: C:/defender-exclude-calico.ps1
244+
permissions: "0744"
245+
content: |-
246+
Add-MpPreference -ExclusionProcess C:/opt/cni/bin/calico.exe
247+
Add-MpPreference -ExclusionProcess C:/opt/cni/bin/calico-ipam.exe
248+
---
249+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
250+
kind: AzureMachineTemplate
251+
metadata:
252+
name: ci-default-worker-win
253+
annotations:
254+
runtime: containerd
255+
spec:
256+
template:
257+
spec:
258+
osDisk:
259+
osType: "Windows"
260+
diskSizeGB: 128
261+
managedDisk:
262+
storageAccountType: "Premium_LRS"
263+
sshPublicKey: ""
264+
vmSize: replace_me
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
namespace: default
4+
resources:
5+
- base.yaml
6+
- ../../../azure-cluster-identity
7+
patchesStrategicMerge:
8+
- patches.yaml
9+
- variables.yaml

0 commit comments

Comments
 (0)