Skip to content

Commit 7c9a2cc

Browse files
committed
Use containerDisk instead of PVC
Signed-off-by: Johanan Liebermann <[email protected]>
1 parent 41c4b4e commit 7c9a2cc

File tree

1 file changed

+8
-48
lines changed

1 file changed

+8
-48
lines changed

templates/cluster-template-lb-flatcar.yaml

+8-48
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# export CLUSTER_NAME=my-cluster # replace your cluster name here
22
# export NAMESPACE=default # replace your namespace here
3-
# export ROOT_VOLUME_SIZE=200G
43
# export KUBERNETES_VERSION=v1.30.5
54
# export NODE_VM_IMAGE_TEMPLATE="capi-flatcar-3975-2-2-v1.30.5.img" # Flatcar image should be pre-build. Check the project https://github.com/kubernetes-sigs/image-builder for more details
6-
# export STORAGE_CLASS_NAME=ceph-block
75
# export CONTROL_PLANE_MACHINE_COUNT=3
86
# export WORKER_MACHINE_COUNT=3
97
# export INSTANCE_TYPE=u1.large
@@ -66,22 +64,6 @@ spec:
6664
preference:
6765
kind: VirtualMachineClusterPreference
6866
name: "${INSTANCE_PREFERENCE}"
69-
dataVolumeTemplates:
70-
- metadata:
71-
name: "boot-volume"
72-
spec:
73-
pvc:
74-
volumeMode: Block
75-
accessModes:
76-
- ReadWriteOnce
77-
resources:
78-
requests:
79-
storage: "${ROOT_VOLUME_SIZE}"
80-
storageClassName: "${STORAGE_CLASS_NAME}"
81-
source:
82-
pvc:
83-
name: ${NODE_VM_IMAGE_TEMPLATE}
84-
# namespace: golden-images
8567
runStrategy: Always
8668
template:
8769
spec:
@@ -91,15 +73,12 @@ spec:
9173
disks:
9274
- disk:
9375
bus: virtio
94-
name: dv-volume
76+
name: containervolume
9577
evictionStrategy: External
9678
volumes:
97-
# - name: serviceaccount
98-
# serviceAccount:
99-
# serviceAccountName: cdi-cloner
100-
- dataVolume:
101-
name: "boot-volume"
102-
name: dv-volume
79+
- containerDisk:
80+
image: "${NODE_VM_IMAGE_TEMPLATE}"
81+
name: containervolume
10382
---
10483
kind: KubeadmControlPlane
10584
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
@@ -165,22 +144,6 @@ spec:
165144
preference:
166145
kind: VirtualMachineClusterPreference
167146
name: "${INSTANCE_PREFERENCE}"
168-
dataVolumeTemplates:
169-
- metadata:
170-
name: "boot-volume"
171-
spec:
172-
pvc:
173-
volumeMode: Block
174-
accessModes:
175-
- ReadWriteOnce
176-
resources:
177-
requests:
178-
storage: "${ROOT_VOLUME_SIZE}"
179-
storageClassName: "${STORAGE_CLASS_NAME}"
180-
source:
181-
pvc:
182-
name: ${NODE_VM_IMAGE_TEMPLATE}
183-
# namespace: golden-images
184147
runStrategy: Always
185148
template:
186149
metadata:
@@ -205,15 +168,12 @@ spec:
205168
disks:
206169
- disk:
207170
bus: virtio
208-
name: dv-volume
171+
name: containervolume
209172
evictionStrategy: External
210173
volumes:
211-
# - name: serviceaccount
212-
# serviceAccount:
213-
# serviceAccountName: cdi-cloner
214-
- dataVolume:
215-
name: "boot-volume"
216-
name: dv-volume
174+
- containerDisk:
175+
image: "${NODE_VM_IMAGE_TEMPLATE}"
176+
name: containervolume
217177
---
218178
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
219179
kind: KubeadmConfigTemplate

0 commit comments

Comments
 (0)