Implement Container Linux config spec 3.x support via butane transpiler #890
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Flatcar and Fedora CoreOS use different major versions of the Container Linux configuration specifications, with each of them developing their own versions of the respective parser.
I ran into trouble using a YAML file to provide Ignition configuration for Fedora CoreOS. It turns out things such as
storage.directores
andstorage.files
no longer needingfilesystem: root
are incompatibilities with the CoreOS Container Linux configuration parser that is still used in Matchbox.I could not simply replace the transpiler with the one used for Fedora CoreOS (butane) since it does not support Ignition specs older than 3.0.0, also explicitly laid down by this comment. Flatcar on the other hand continues to use the 2.x specs.
As such I have thought about how to handle the situation and decided to split how the configuration is parsed based on whether
version
/variant
fields have been specified.variant
isflatcar
, also use the flatcar transpiler. This is for future-proofing this solution and/or provide an escape hatch if they ever decide to use a variation of the 3.x spec.Marking this as draft until I have fully tested this out with currently existing versions of Flatcar and Fedora CoreOS. Not testing against old legacy CoreOS, this is most likely going to be breaking change for that case (Flatcar defaults to 2.3.x spec, old CoreOS transpiler outputs 2.2.x Ignition configs).