Skip to content

Commit 1c92183

Browse files
invidiank8s-infra-cherrypick-robot
authored andcommitted
templates/flavors/flatcar: fix mounting etcd disk
Workaround for a CABPK bug with conversion of Ignition v2 to v3 as described in kubernetes-sigs/cluster-api#7679 has been added while Flatcar templates were still in development. While it boots and does not produce any errors, it turns out that the disk does not actually get mounted. This is because at the moment 'mounts' CABPK field requires 'diskSetup.filesystems' to be populated for mapping disk names to device path. This commit fixes missing mount. Signed-off-by: Mateusz Gozdek <[email protected]>
1 parent 4561a08 commit 1c92183

File tree

3 files changed

+25
-31
lines changed

3 files changed

+25
-31
lines changed

templates/cluster-template-flatcar.yaml

Lines changed: 8 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/flavors/flatcar/patches/kubeadm-controlplane.yaml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@ metadata:
55
name: ${CLUSTER_NAME}-control-plane
66
spec:
77
kubeadmConfigSpec:
8-
# Workaround for https://github.com/kubernetes-sigs/cluster-api/issues/7679.
98
diskSetup:
10-
filesystems: []
9+
filesystems:
10+
- device: /dev/disk/azure/scsi1/lun0
11+
extraOpts:
12+
- -E
13+
- lazy_itable_init=1,lazy_journal_init=1
14+
filesystem: ext4
15+
label: etcd_disk
16+
overwrite: false
17+
# Workaround for https://github.com/kubernetes-sigs/cluster-api/issues/7679.
1118
partitions: []
1219
format: ignition
1320
ignition:
@@ -27,15 +34,6 @@ spec:
2734
- device: /dev/disk/azure/scsi1/lun0
2835
partitions:
2936
- number: 1
30-
filesystems:
31-
- name: etcd_disk
32-
mount:
33-
device: /dev/disk/azure/scsi1/lun0
34-
format: ext4
35-
label: etcd_disk
36-
options:
37-
- -E
38-
- lazy_itable_init=1,lazy_journal_init=1
3937
initConfiguration:
4038
nodeRegistration:
4139
name: '@@HOSTNAME@@'

templates/test/ci/cluster-template-prow-flatcar.yaml

Lines changed: 8 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)