From 93731565c0cea5bb047025f17804bdea2d12afe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Wed, 3 Apr 2024 08:48:09 +0200 Subject: [PATCH] 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. --- flatcar.pkr.hcl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/flatcar.pkr.hcl b/flatcar.pkr.hcl index 1315c22..51c8308 100644 --- a/flatcar.pkr.hcl +++ b/flatcar.pkr.hcl @@ -81,12 +81,19 @@ build { "chmod +x flatcar-install", # 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", "mount /dev/disk/by-label/OEM /root/OEM", + + ## Kernel Parameter "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", ] }