Allow 'oem' scheme for source url
Currently experimenting with Flatcar, I'm using butane to generate my ignition file.
Documentation suggests the use of oem:/// to retrieve files from /oem partition during ignition phase.
With the special oem:/// file URL the config can copy files from the OEM Partition to the root filesystem
Source: https://www.flatcar.org/docs/latest/installing/customizing-the-image/customize-the-image/#customizing-the-oem-partition
I haven't found any issue about this topic. Also it appears Ignition specification does not mention this, even the Flatcar one (https://www.flatcar.org/docs/latest/provisioning/ignition/specification/).
Oh, yes so there should not be any documentation of this in Ignition. Flatcar is a consumer of ignition, and it has this partition which they document but Ignition is not directly aware of the things that depend on it as it is platform agnostic.
Butane being a sugar translator for platforms, it does have a concept of flatcar, but in this case oem:// does not have sugar. I believe its expecting the user to look at files in that source.
i.e
variant: flatcar
version: 1.0.0
storage:
files:
- path: /usr/local/bin/oem-script.sh
mode: 0755
contents:
source: oem:///scripts/oem-script.sh
I would expect maybe some examples here https://www.flatcar.org/docs/latest/provisioning/config-transpiler/examples/ but I don't see any. @tormath1 correct me if I am wrong in anything.
Does this not work?
Expanded url schemes so ignition.validate will not present this in butane anymore.
We reverted the change in Ignition in https://github.com/coreos/ignition/pull/2163.
The plan is likely to:
- Add support for a
file://scheme in Ignition to tell it to read files from what it has available in the initrd (i.e. mounts points set up by the initrd before Ignition runs). - Add sugar in Butane for variants that mount an oem partition at a specific path in the initrd.