@@ -36,39 +36,33 @@ metadata:
36
36
name : docker-clusterclass-v0.1.0
37
37
spec :
38
38
controlPlane :
39
- ref :
39
+ templateRef :
40
40
apiVersion : controlplane.cluster.x-k8s.io/v1beta2
41
41
kind : KubeadmControlPlaneTemplate
42
42
name : docker-clusterclass-v0.1.0
43
- namespace : default
44
43
machineInfrastructure :
45
- ref :
44
+ templateRef :
45
+ apiVersion : infrastructure.cluster.x-k8s.io/v1beta2
46
46
kind : DockerMachineTemplate
47
- apiVersion : infrastructure.cluster.x-k8s.io/v1beta1
48
47
name : docker-clusterclass-v0.1.0
49
- namespace : default
50
48
infrastructure :
51
- ref :
52
- apiVersion : infrastructure.cluster.x-k8s.io/v1beta1
49
+ templateRef :
50
+ apiVersion : infrastructure.cluster.x-k8s.io/v1beta2
53
51
kind : DockerClusterTemplate
54
52
name : docker-clusterclass-v0.1.0-control-plane
55
- namespace : default
56
53
workers :
57
54
machineDeployments :
58
55
- class : default-worker
59
- template :
60
- bootstrap :
61
- ref :
62
- apiVersion : bootstrap.cluster.x-k8s.io/v1beta2
63
- kind : KubeadmConfigTemplate
64
- name : docker-clusterclass-v0.1.0-default-worker
65
- namespace : default
66
- infrastructure :
67
- ref :
68
- apiVersion : infrastructure.cluster.x-k8s.io/v1beta1
69
- kind : DockerMachineTemplate
70
- name : docker-clusterclass-v0.1.0-default-worker
71
- namespace : default
56
+ bootstrap :
57
+ templateRef :
58
+ apiVersion : bootstrap.cluster.x-k8s.io/v1beta2
59
+ kind : KubeadmConfigTemplate
60
+ name : docker-clusterclass-v0.1.0-default-worker
61
+ infrastructure :
62
+ templateRef :
63
+ apiVersion : infrastructure.cluster.x-k8s.io/v1beta2
64
+ kind : DockerMachineTemplate
65
+ name : docker-clusterclass-v0.1.0-default-worker
72
66
` ` `
73
67
74
68
The following example shows a Cluster using this ClusterClass. In this case a ` KubeadmControlPlane`
@@ -142,17 +136,16 @@ spec:
142
136
workers:
143
137
machinePools:
144
138
- class: default-worker
145
- template:
146
- bootstrap:
147
- ref:
148
- apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
149
- kind: KubeadmConfigTemplate
150
- name: quick-start-default-worker-bootstraptemplate
151
- infrastructure:
152
- ref:
153
- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
154
- kind: DockerMachinePoolTemplate
155
- name: quick-start-default-worker-machinepooltemplate
139
+ bootstrap:
140
+ templateRef:
141
+ apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
142
+ kind: KubeadmConfigTemplate
143
+ name: quick-start-default-worker-bootstraptemplate
144
+ infrastructure:
145
+ templateRef:
146
+ apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
147
+ kind: DockerMachinePoolTemplate
148
+ name: quick-start-default-worker-machinepooltemplate
156
149
` ` `
157
150
158
151
They can then be similarly defined as workers in the cluster template like so :
@@ -191,30 +184,36 @@ metadata:
191
184
spec:
192
185
controlPlane:
193
186
...
194
- machineHealthCheck:
195
- maxUnhealthy: 33%
196
- nodeStartupTimeout: 15m
197
- unhealthyNodeConditions:
198
- - type: Ready
199
- status: Unknown
200
- timeout: 300s
201
- - type: Ready
202
- status: "False"
203
- timeout: 300s
204
- workers:
205
- machineDeployments:
206
- - class: default-worker
207
- ...
208
- machineHealthCheck:
209
- unhealthyRange: "[0-2]"
210
- nodeStartupTimeout: 10m
187
+ healthCheck:
188
+ checks:
189
+ nodeStartupTimeoutSeconds: 900
211
190
unhealthyNodeConditions:
212
191
- type: Ready
213
192
status: Unknown
214
- timeout: 300s
193
+ timeoutSeconds: 300
215
194
- type: Ready
216
195
status: "False"
217
- timeout: 300s
196
+ timeoutSeconds: 300
197
+ remediation:
198
+ triggerIf:
199
+ unhealthyLessThanOrEqualTo: 33%
200
+ workers:
201
+ machineDeployments:
202
+ - class: default-worker
203
+ ...
204
+ healthCheck:
205
+ checks:
206
+ nodeStartupTimeoutSeconds: 600
207
+ unhealthyNodeConditions:
208
+ - type: Ready
209
+ status: Unknown
210
+ timeoutSeconds: 300
211
+ - type: Ready
212
+ status: "False"
213
+ timeoutSeconds: 300
214
+ remediation:
215
+ triggerIf:
216
+ unhealthyInRange: "[0-2]"
218
217
` ` `
219
218
220
219
# # ClusterClass with patches
@@ -479,7 +478,7 @@ spec:
479
478
matchConstraints:
480
479
resourceRules:
481
480
- apiGroups: ["cluster.x-k8s.io"]
482
- apiVersions: ["v1beta1 "]
481
+ apiVersions: ["v1beta2 "]
483
482
operations: ["CREATE", "UPDATE"]
484
483
resources: ["clusters"]
485
484
validations:
@@ -537,7 +536,7 @@ spec:
537
536
- name: workerMachineType
538
537
definitions:
539
538
- selector:
540
- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
539
+ apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
541
540
kind: AWSMachineTemplate
542
541
matchResources:
543
542
machineDeploymentClass:
@@ -549,7 +548,7 @@ spec:
549
548
valueFrom:
550
549
variable: workerMachineType
551
550
---
552
- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
551
+ apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
553
552
kind: AWSMachineTemplate
554
553
metadata:
555
554
name: aws-clusterclass-v0.1.0-default-worker
@@ -662,7 +661,7 @@ spec:
662
661
description: "Sets the container image that is used for running dockerMachines."
663
662
definitions:
664
663
- selector:
665
- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
664
+ apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
666
665
kind: DockerMachineTemplate
667
666
matchResources:
668
667
machineDeploymentClass:
0 commit comments