Skip to content

Commit 4541443

Browse files
authored
⚠️ Update example manifests (#12480)
* update examples Signed-off-by: sivchari <[email protected]> * update spec to adjust for v1beta2 Signed-off-by: sivchari <[email protected]> * update machineTemplate spec Signed-off-by: sivchari <[email protected]> * add extraMounts Signed-off-by: sivchari <[email protected]> --------- Signed-off-by: sivchari <[email protected]>
1 parent 1606c6d commit 4541443

File tree

4 files changed

+115
-99
lines changed

4 files changed

+115
-99
lines changed
Lines changed: 26 additions & 24 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: cluster.x-k8s.io/v1beta1
2+
apiVersion: cluster.x-k8s.io/v1beta2
33
kind: Cluster
44
metadata:
55
name: my-cluster
@@ -12,23 +12,21 @@ spec:
1212
cidrBlocks: ["192.168.0.0/16"]
1313
serviceDomain: cluster.local
1414
controlPlaneRef:
15-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
15+
apiGroup: controlplane.cluster.x-k8s.io
1616
kind: KubeadmControlPlane
1717
name: controlplane
18-
namespace: default
1918
infrastructureRef:
20-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
19+
apiGroup: infrastructure.cluster.x-k8s.io
2120
kind: DockerCluster
2221
name: my-cluster
23-
namespace: default
2422
---
25-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
23+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
2624
kind: DockerCluster
2725
metadata:
2826
name: my-cluster
2927
namespace: default
3028
---
31-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
29+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
3230
kind: KubeadmControlPlane
3331
metadata:
3432
name: controlplane
@@ -37,11 +35,11 @@ spec:
3735
replicas: 1
3836
version: v1.34.0-beta.0
3937
machineTemplate:
40-
infrastructureRef:
41-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
42-
kind: DockerMachineTemplate
43-
name: controlplane
44-
namespace: default
38+
spec:
39+
infrastructureRef:
40+
apiGroup: infrastructure.cluster.x-k8s.io
41+
kind: DockerMachineTemplate
42+
name: controlplane
4543
kubeadmConfigSpec:
4644
clusterConfiguration:
4745
apiServer:
@@ -52,22 +50,27 @@ spec:
5250
initConfiguration:
5351
nodeRegistration:
5452
kubeletExtraArgs:
55-
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
53+
- name: "eviction-hard"
54+
value: "nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%"
5655
joinConfiguration:
5756
nodeRegistration:
5857
kubeletExtraArgs:
59-
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
58+
- name: "eviction-hard"
59+
value: "nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%"
6060
---
61-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
61+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
6262
kind: DockerMachineTemplate
6363
metadata:
6464
name: controlplane
6565
namespace: default
6666
spec:
6767
template:
68-
spec: {}
68+
spec:
69+
extraMounts:
70+
- containerPath: "/var/run/docker.sock"
71+
hostPath: "/var/run/docker.sock"
6972
---
70-
apiVersion: cluster.x-k8s.io/v1beta1
73+
apiVersion: cluster.x-k8s.io/v1beta2
7174
kind: MachinePool
7275
metadata:
7376
name: worker-mp-0
@@ -81,23 +84,21 @@ spec:
8184
clusterName: my-cluster
8285
bootstrap:
8386
configRef:
84-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
87+
apiGroup: bootstrap.cluster.x-k8s.io
8588
kind: KubeadmConfig
8689
name: worker-mp-0-config
87-
namespace: default
8890
infrastructureRef:
89-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
91+
apiGroup: infrastructure.cluster.x-k8s.io
9092
kind: DockerMachinePool
9193
name: worker-dmp-0
92-
namespace: default
9394
---
94-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
95+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
9596
kind: DockerMachinePool
9697
metadata:
9798
name: worker-dmp-0
9899
namespace: default
99100
---
100-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
101+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
101102
kind: KubeadmConfig
102103
metadata:
103104
name: worker-mp-0-config
@@ -106,4 +107,5 @@ spec:
106107
joinConfiguration:
107108
nodeRegistration:
108109
kubeletExtraArgs:
109-
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
110+
- name: "eviction-hard"
111+
value: "nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%"
Lines changed: 38 additions & 29 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: cluster.x-k8s.io/v1beta1
2+
apiVersion: cluster.x-k8s.io/v1beta2
33
kind: Cluster
44
metadata:
55
name: my-cluster
@@ -12,23 +12,21 @@ spec:
1212
cidrBlocks: ["fd00:100:96::/48"]
1313
serviceDomain: cluster.local
1414
controlPlaneRef:
15-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
15+
apiGroup: controlplane.cluster.x-k8s.io
1616
kind: KubeadmControlPlane
1717
name: controlplane
18-
namespace: default
1918
infrastructureRef:
20-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
19+
apiGroup: infrastructure.cluster.x-k8s.io
2120
kind: DockerCluster
2221
name: my-cluster
23-
namespace: default
2422
---
25-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
23+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
2624
kind: DockerCluster
2725
metadata:
2826
name: my-cluster
2927
namespace: default
3028
---
31-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
29+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
3230
kind: KubeadmControlPlane
3331
metadata:
3432
name: controlplane
@@ -37,11 +35,11 @@ spec:
3735
replicas: 1
3836
version: v1.34.0-beta.0
3937
machineTemplate:
40-
infrastructureRef:
41-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
42-
kind: DockerMachineTemplate
43-
name: controlplane
44-
namespace: default
38+
spec:
39+
infrastructureRef:
40+
apiGroup: infrastructure.cluster.x-k8s.io
41+
kind: DockerMachineTemplate
42+
name: controlplane
4543
kubeadmConfigSpec:
4644
clusterConfiguration:
4745
apiServer:
@@ -57,24 +55,31 @@ spec:
5755
bindPort: 6443
5856
nodeRegistration:
5957
kubeletExtraArgs:
60-
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
61-
node-ip: "::"
58+
- name: "eviction-hard"
59+
value: "nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%"
60+
- name: "node-ip"
61+
value: "::"
6262
joinConfiguration:
6363
nodeRegistration:
6464
kubeletExtraArgs:
65-
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
66-
node-ip: "::"
65+
- name: "eviction-hard"
66+
value: "nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%"
67+
- name: "node-ip"
68+
value: "::"
6769
---
68-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
70+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
6971
kind: DockerMachineTemplate
7072
metadata:
7173
name: controlplane
7274
namespace: default
7375
spec:
7476
template:
75-
spec: {}
77+
spec:
78+
extraMounts:
79+
- containerPath: "/var/run/docker.sock"
80+
hostPath: "/var/run/docker.sock"
7681
---
77-
apiVersion: cluster.x-k8s.io/v1beta1
82+
apiVersion: cluster.x-k8s.io/v1beta2
7883
kind: MachineDeployment
7984
metadata:
8085
name: worker-md-0
@@ -91,26 +96,27 @@ spec:
9196
clusterName: my-cluster
9297
bootstrap:
9398
configRef:
94-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
99+
apiGroup: bootstrap.cluster.x-k8s.io
95100
kind: KubeadmConfigTemplate
96101
name: worker
97-
namespace: default
98102
infrastructureRef:
99-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
103+
apiGroup: infrastructure.cluster.x-k8s.io
100104
kind: DockerMachineTemplate
101105
name: worker
102-
namespace: default
103106
---
104-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
107+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
105108
kind: DockerMachineTemplate
106109
metadata:
107110
name: worker
108111
namespace: default
109112
spec:
110113
template:
111-
spec: {}
114+
spec:
115+
extraMounts:
116+
- containerPath: "/var/run/docker.sock"
117+
hostPath: "/var/run/docker.sock"
112118
---
113-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
119+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
114120
kind: KubeadmConfigTemplate
115121
metadata:
116122
name: worker
@@ -121,9 +127,12 @@ spec:
121127
initConfiguration:
122128
nodeRegistration:
123129
kubeletExtraArgs:
124-
node-ip: "::"
130+
- name: "node-ip"
131+
value: "::"
125132
joinConfiguration:
126133
nodeRegistration:
127134
kubeletExtraArgs:
128-
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
129-
node-ip: "::"
135+
- name: "eviction-hard"
136+
value: "nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%"
137+
- name: "node-ip"
138+
value: "::"

test/infrastructure/docker/examples/simple-cluster-without-kcp.yaml

Lines changed: 21 additions & 21 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: cluster.x-k8s.io/v1beta1
2+
apiVersion: cluster.x-k8s.io/v1beta2
33
kind: Cluster
44
metadata:
55
name: my-cluster
@@ -12,18 +12,17 @@ spec:
1212
cidrBlocks: ["192.168.0.0/16"]
1313
serviceDomain: cluster.local
1414
infrastructureRef:
15-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
15+
apiGroup: infrastructure.cluster.x-k8s.io
1616
kind: DockerCluster
1717
name: my-cluster
18-
namespace: default
1918
---
20-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
19+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
2120
kind: DockerCluster
2221
metadata:
2322
name: my-cluster
2423
namespace: default
2524
---
26-
apiVersion: cluster.x-k8s.io/v1beta1
25+
apiVersion: cluster.x-k8s.io/v1beta2
2726
kind: Machine
2827
metadata:
2928
labels:
@@ -36,17 +35,15 @@ spec:
3635
clusterName: my-cluster
3736
bootstrap:
3837
configRef:
39-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
38+
apiGroup: bootstrap.cluster.x-k8s.io
4039
kind: KubeadmConfig
4140
name: controlplane-0-config
42-
namespace: default
4341
infrastructureRef:
44-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
42+
apiGroup: infrastructure.cluster.x-k8s.io
4543
kind: DockerMachine
4644
name: controlplane-0
47-
namespace: default
4845
---
49-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
46+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
5047
kind: KubeadmConfig
5148
metadata:
5249
name: controlplane-0-config
@@ -55,15 +52,16 @@ spec:
5552
initConfiguration:
5653
nodeRegistration:
5754
kubeletExtraArgs:
58-
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
55+
- name: "eviction-hard"
56+
value: "nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%"
5957
---
60-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
58+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
6159
kind: DockerMachine
6260
metadata:
6361
name: controlplane-0
6462
namespace: default
6563
---
66-
apiVersion: cluster.x-k8s.io/v1beta1
64+
apiVersion: cluster.x-k8s.io/v1beta2
6765
kind: MachineDeployment
6866
metadata:
6967
name: worker-md-0
@@ -80,26 +78,27 @@ spec:
8078
clusterName: my-cluster
8179
bootstrap:
8280
configRef:
83-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
81+
apiGroup: bootstrap.cluster.x-k8s.io
8482
kind: KubeadmConfigTemplate
8583
name: worker
86-
namespace: default
8784
infrastructureRef:
88-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
85+
apiGroup: infrastructure.cluster.x-k8s.io
8986
kind: DockerMachineTemplate
9087
name: worker
91-
namespace: default
9288
---
93-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
89+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
9490
kind: DockerMachineTemplate
9591
metadata:
9692
name: worker
9793
namespace: default
9894
spec:
9995
template:
100-
spec: {}
96+
spec:
97+
extraMounts:
98+
- containerPath: "/var/run/docker.sock"
99+
hostPath: "/var/run/docker.sock"
101100
---
102-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
101+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
103102
kind: KubeadmConfigTemplate
104103
metadata:
105104
name: worker
@@ -110,4 +109,5 @@ spec:
110109
joinConfiguration:
111110
nodeRegistration:
112111
kubeletExtraArgs:
113-
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
112+
- name: "eviction-hard"
113+
value: "nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%"

0 commit comments

Comments
 (0)