Skip to content

Commit 15d79c3

Browse files
committed
migrate definition to v2 specification
Signed-off-by: sivchari <shibuuuu5@gmail.com>
1 parent 11c4175 commit 15d79c3

File tree

5 files changed

+50
-52
lines changed

5 files changed

+50
-52
lines changed

test/e2e/data/infrastructure-docker/main/cluster-template-kcp-remediation/mhc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ spec:
1414
matchLabels:
1515
cluster.x-k8s.io/control-plane: ""
1616
mhc-test: "fail"
17-
nodeStartupTimeout: 30s
17+
nodeStartupTimeoutSeconds: 30
1818
unhealthyConditions:
1919
- type: e2e.remediation.condition
2020
status: "False"
21-
timeout: 10s
21+
timeoutSeconds: 10

test/e2e/data/infrastructure-docker/main/cluster-template-md-remediation/mhc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ spec:
1515
unhealthyConditions:
1616
- type: e2e.remediation.condition
1717
status: "False"
18-
timeout: 10s
18+
timeoutSeconds: 10

test/e2e/data/infrastructure-docker/main/clusterclass-in-memory.yaml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -105,52 +105,50 @@ metadata:
105105
name: in-memory
106106
spec:
107107
controlPlane:
108-
metadata:
109-
annotations:
110108
machineInfrastructure:
111-
ref:
112-
apiGroup: infrastructure.cluster.x-k8s.io
109+
templateRef:
110+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
113111
kind: DevMachineTemplate
114112
name: in-memory-control-plane
115-
ref:
116-
apiGroup: controlplane.cluster.x-k8s.io
113+
templateRef:
114+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
117115
kind: KubeadmControlPlaneTemplate
118116
name: in-memory-control-plane
119117
machineHealthCheck:
120118
unhealthyConditions:
121119
- type: Ready
122-
status: Unknown
123-
timeout: 300s
120+
status: "Unknown"
121+
timeoutSeconds: 300
124122
- type: Ready
125123
status: "False"
126-
timeout: 300s
124+
timeoutSeconds: 300
127125
infrastructure:
128-
ref:
129-
apiGroup: infrastructure.cluster.x-k8s.io
126+
templateRef:
127+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
130128
kind: DevClusterTemplate
131129
name: in-memory-cluster
132130
workers:
133131
machineDeployments:
134132
- class: default-worker
135133
template:
136134
bootstrap:
137-
ref:
138-
apiGroup: bootstrap.cluster.x-k8s.io
135+
templateRef:
136+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
139137
kind: KubeadmConfigTemplate
140138
name: in-memory-default-worker-bootstraptemplate
141139
infrastructure:
142-
ref:
143-
apiGroup: infrastructure.cluster.x-k8s.io
140+
templateRef:
141+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
144142
kind: DevMachineTemplate
145143
name: in-memory-default-worker-machinetemplate
146144
machineHealthCheck:
147145
unhealthyConditions:
148146
- type: Ready
149-
status: Unknown
150-
timeout: 300s
147+
status: "Unknown"
148+
timeoutSeconds: 300
151149
- type: Ready
152150
status: "False"
153-
timeout: 300s
151+
timeoutSeconds: 300
154152
patches:
155153
- name: test-patch
156154
external:

test/e2e/data/infrastructure-docker/main/clusterclass-quick-start-runtimesdk.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ metadata:
44
name: quick-start-runtimesdk
55
spec:
66
controlPlane:
7-
ref:
8-
apiGroup: controlplane.cluster.x-k8s.io
7+
templateRef:
8+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
99
kind: KubeadmControlPlaneTemplate
1010
name: quick-start-control-plane
1111
machineInfrastructure:
12-
ref:
12+
templateRef:
13+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
1314
kind: DockerMachineTemplate
14-
apiGroup: infrastructure.cluster.x-k8s.io
1515
name: quick-start-control-plane
1616
namingStrategy:
1717
template: "{{ .cluster.name }}-cp-{{ .random }}"
1818
infrastructure:
19-
ref:
20-
apiGroup: infrastructure.cluster.x-k8s.io
19+
templateRef:
20+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
2121
kind: DockerClusterTemplate
2222
name: quick-start-cluster
2323
infrastructureNamingStrategy:
@@ -29,13 +29,13 @@ spec:
2929
template: "{{ .cluster.name }}-md-{{ .machineDeployment.topologyName }}-{{ .random }}"
3030
template:
3131
bootstrap:
32-
ref:
33-
apiGroup: bootstrap.cluster.x-k8s.io
32+
templateRef:
33+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
3434
kind: KubeadmConfigTemplate
3535
name: quick-start-default-worker-bootstraptemplate
3636
infrastructure:
37-
ref:
38-
apiGroup: infrastructure.cluster.x-k8s.io
37+
templateRef:
38+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
3939
kind: DockerMachineTemplate
4040
name: quick-start-default-worker-machinetemplate
4141
machinePools:
@@ -44,13 +44,13 @@ spec:
4444
template: "{{ .cluster.name }}-mp-{{ .machinePool.topologyName }}-{{ .random }}"
4545
template:
4646
bootstrap:
47-
ref:
48-
apiGroup: bootstrap.cluster.x-k8s.io
47+
templateRef:
48+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
4949
kind: KubeadmConfigTemplate
5050
name: quick-start-default-worker-bootstraptemplate
5151
infrastructure:
52-
ref:
53-
apiGroup: infrastructure.cluster.x-k8s.io
52+
templateRef:
53+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
5454
kind: DockerMachinePoolTemplate
5555
name: quick-start-default-worker-machinepooltemplate
5656
patches:
@@ -93,7 +93,7 @@ spec:
9393
template:
9494
spec:
9595
machineTemplate:
96-
nodeDrainTimeout: 1s
96+
nodeDrainTimeoutSeconds: 1
9797
kubeadmConfigSpec:
9898
clusterConfiguration:
9999
apiServer:

test/e2e/data/infrastructure-docker/main/clusterclass-quick-start.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,24 @@ spec:
99
ClusterClass.controlPlane.label: "ClusterClass.controlPlane.labelValue"
1010
annotations:
1111
ClusterClass.controlPlane.annotation: "ClusterClass.controlPlane.annotationValue"
12-
ref:
13-
apiGroup: controlplane.cluster.x-k8s.io
12+
templateRef:
13+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
1414
kind: KubeadmControlPlaneTemplate
1515
name: quick-start-control-plane
1616
machineInfrastructure:
17-
ref:
17+
templateRef:
18+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
1819
kind: DockerMachineTemplate
19-
apiGroup: infrastructure.cluster.x-k8s.io
2020
name: quick-start-control-plane
2121
machineHealthCheck:
2222
maxUnhealthy: 100%
2323
unhealthyConditions:
2424
- type: e2e.remediation.condition
2525
status: "False"
26-
timeout: 20s
26+
timeoutSeconds: 20
2727
infrastructure:
28-
ref:
29-
apiGroup: infrastructure.cluster.x-k8s.io
28+
templateRef:
29+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
3030
kind: DockerClusterTemplate
3131
name: quick-start-cluster
3232
workers:
@@ -39,13 +39,13 @@ spec:
3939
annotations:
4040
ClusterClass.machineDeployment.annotation: "ClusterClass.machineDeployment.annotationValue"
4141
bootstrap:
42-
ref:
43-
apiGroup: bootstrap.cluster.x-k8s.io
42+
templateRef:
43+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
4444
kind: KubeadmConfigTemplate
4545
name: quick-start-md-default-worker-bootstraptemplate
4646
infrastructure:
47-
ref:
48-
apiGroup: infrastructure.cluster.x-k8s.io
47+
templateRef:
48+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
4949
kind: DockerMachineTemplate
5050
name: quick-start-default-worker-machinetemplate
5151
machineHealthCheck:
@@ -60,13 +60,13 @@ spec:
6060
annotations:
6161
ClusterClass.machinePool.annotation: "ClusterClass.machinePool.annotationValue"
6262
bootstrap:
63-
ref:
64-
apiGroup: bootstrap.cluster.x-k8s.io
63+
templateRef:
64+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
6565
kind: KubeadmConfigTemplate
6666
name: quick-start-mp-default-worker-bootstraptemplate
6767
infrastructure:
68-
ref:
69-
apiGroup: infrastructure.cluster.x-k8s.io
68+
templateRef:
69+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
7070
kind: DockerMachinePoolTemplate
7171
name: quick-start-default-worker-machinepooltemplate
7272
variables:
@@ -541,7 +541,7 @@ spec:
541541
ControlPlaneTemplate.machineTemplate.label: "ControlPlaneTemplate.machineTemplate.labelValue"
542542
annotations:
543543
ControlPlaneTemplate.machineTemplate.annotation: "ControlPlaneTemplate.machineTemplate.annotationValue"
544-
nodeDrainTimeout: 1s
544+
nodeDrainTimeoutSeconds: 1
545545
kubeadmConfigSpec:
546546
clusterConfiguration:
547547
# extraArgs must be non-empty for control plane components to enable patches from ClusterClass to work.

0 commit comments

Comments
 (0)