Skip to content

Commit f6a5692

Browse files
authored
fix sample and metadata (#32)
1 parent 72873b1 commit f6a5692

File tree

3 files changed

+32
-27
lines changed

3 files changed

+32
-27
lines changed

examples/sample-cp-only.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Creates a cluster with one control-plane node and one worker node
2-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
2+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
33
kind: MaasCluster
44
metadata:
55
name: my-cluster
@@ -11,7 +11,7 @@ spec:
1111
dnsDomain: maas.sc
1212
failureDomains: ['az1']
1313
---
14-
apiVersion: cluster.x-k8s.io/v1alpha3
14+
apiVersion: cluster.x-k8s.io/v1alpha4
1515
kind: Cluster
1616
metadata:
1717
name: my-cluster
@@ -24,17 +24,17 @@ spec:
2424
cidrBlocks: ["192.168.0.0/16"]
2525
serviceDomain: "cluster.local"
2626
controlPlaneRef:
27-
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
27+
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
2828
kind: KubeadmControlPlane
2929
name: controlplane
3030
namespace: default
3131
infrastructureRef:
32-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
32+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
3333
kind: MaasCluster
3434
name: my-cluster
3535
namespace: default
3636
---
37-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
37+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
3838
kind: MaasMachineTemplate
3939
metadata:
4040
name: controlplane
@@ -46,19 +46,20 @@ spec:
4646
minMemory: 8192
4747
image: u-1804-0-k-1208-0
4848
---
49-
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
49+
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
5050
kind: KubeadmControlPlane
5151
metadata:
5252
name: controlplane
5353
namespace: default
5454
spec:
5555
replicas: 1
5656
version: v1.20.8
57-
infrastructureTemplate:
58-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
59-
kind: MaasMachineTemplate
60-
name: controlplane
61-
namespace: default
57+
machineTemplate:
58+
infrastructureRef:
59+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
60+
kind: MaasMachineTemplate
61+
name: controlplane
62+
namespace: default
6263
kubeadmConfigSpec:
6364
clusterConfiguration:
6465
apiServer:

examples/sample-with-workerpool.yaml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Creates a cluster with one control-plane node and one worker node
2-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
2+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
33
kind: MaasCluster
44
metadata:
55
name: my-cluster
66
spec:
77
dnsDomain: maas.sc
88

99
---
10-
apiVersion: cluster.x-k8s.io/v1alpha3
10+
apiVersion: cluster.x-k8s.io/v1alpha4
1111
kind: Cluster
1212
metadata:
1313
name: my-cluster
@@ -19,17 +19,17 @@ spec:
1919
cidrBlocks: ["192.168.0.0/16"]
2020
serviceDomain: "cluster.local"
2121
controlPlaneRef:
22-
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
22+
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
2323
kind: KubeadmControlPlane
2424
name: my-cluster-cp
2525
namespace: default
2626
infrastructureRef:
27-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
27+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
2828
kind: MaasCluster
2929
name: my-cluster
3030
namespace: default
3131
---
32-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
32+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
3333
kind: MaasMachineTemplate
3434
metadata:
3535
name: my-cluster-cp
@@ -41,19 +41,20 @@ spec:
4141
minMemory: 8192
4242
image: u-1804-0-k-11912-0
4343
---
44-
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
44+
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
4545
kind: KubeadmControlPlane
4646
metadata:
4747
name: my-cluster-cp
4848
namespace: default
4949
spec:
5050
replicas: 1
5151
version: v1.19.12
52-
infrastructureTemplate:
53-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
54-
kind: MaasMachineTemplate
55-
name: my-cluster-cp
56-
namespace: default
52+
machineTemplate:
53+
infrastructureRef:
54+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
55+
kind: MaasMachineTemplate
56+
name: my-cluster-cp
57+
namespace: default
5758
kubeadmConfigSpec:
5859
clusterConfiguration:
5960
apiServer:
@@ -107,7 +108,7 @@ spec:
107108
useExperimentalRetryJoin: true
108109
---
109110
status:
110-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
111+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
111112
kind: MaasMachineTemplate
112113
metadata:
113114
name: my-cluster-worker
@@ -119,7 +120,7 @@ spec:
119120
minMemory: 8192
120121
image: u-1804-0-k-11912-0
121122
---
122-
apiVersion: cluster.x-k8s.io/v1alpha3
123+
apiVersion: cluster.x-k8s.io/v1alpha4
123124
kind: MachineDeployment
124125
metadata:
125126
name: my-cluster-worker
@@ -136,15 +137,15 @@ spec:
136137
version: 1.19.12
137138
bootstrap:
138139
configRef:
139-
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3
140+
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4
140141
kind: KubeadmConfigTemplate
141142
name: my-cluster-worker
142143
infrastructureRef:
143-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
144+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
144145
kind: MaasMachineTemplate
145146
name: my-cluster-worker
146147
---
147-
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3
148+
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4
148149
kind: KubeadmConfigTemplate
149150
metadata:
150151
name: my-cluster-worker

metadata.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ releaseSeries:
1111
- major: 0
1212
minor: 2
1313
contract: v1alpha4
14+
- major: 0
15+
minor: 3
16+
contract: v1alpha4

0 commit comments

Comments
 (0)