fix: user data ignition is ignored

I missed the note in the docs that the ignition config specified on
`install-flatcar` will disable the `fetch` stage in ignition. This stage
is required to read the user data ignition config from the metadata
service.

By moving our OEM ignition config to `oemfs/base/base.ign` it will
always be merged with the user data config.
This commit is contained in:
Julian Tölle 2024-04-03 08:48:09 +02:00
parent 425fbf36a4
commit 93731565c0

View file

@ -81,12 +81,19 @@ build {
"chmod +x flatcar-install", "chmod +x flatcar-install",
# Install flatcar # Install flatcar
"./flatcar-install -s -C ${var.flatcar_channel} -i /ignition.json", "./flatcar-install -s -C ${var.flatcar_channel}",
# Setup Kernel Parameters for OEM Platform # Setup Ignition Config & Kernel Parameters for OEM Platform
"mkdir /root/OEM", "mkdir /root/OEM",
"mount /dev/disk/by-label/OEM /root/OEM", "mount /dev/disk/by-label/OEM /root/OEM",
## Kernel Parameter
"echo 'set oem_id=${local.flatcar_oem_id}' > /root/OEM/grub.cfg", "echo 'set oem_id=${local.flatcar_oem_id}' > /root/OEM/grub.cfg",
## Base Ignition Config (merged with user data)
"mkdir /root/OEM/base",
"cp /ignition.json /root/OEM/base/base.ign",
"umount /root/OEM", "umount /root/OEM",
] ]
} }