Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Container Linux config spec 3.x support via butane transpiler #890

Closed
wants to merge 1 commit into from

Conversation

icedream
Copy link

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 and storage.files no longer needing filesystem: 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.

  • If no version is defined, 2.x or older spec for flatcar is assumed, so the flatcar transpiler is used.
  • If a version is defined but variant is flatcar, 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.
  • In all other cases Fedora CoreOS transpiler will be used.

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).

@icedream icedream changed the title Implement parsing via butane for 3.x support. Implement Ignition spec 3.x support via butane transpiler Oct 11, 2021
@icedream icedream changed the title Implement Ignition spec 3.x support via butane transpiler Implement Container Linux config spec 3.x support via butane transpiler Oct 11, 2021
@dghubble
Copy link
Member

Using Fedora CoreOS Butane (formerly fcct) or CoreOS Config is already supported through the Ignition API, with tools like https://github.com/poseidon/terraform-provider-ct that handle transpiling. We're not extending Matchbox's early templating system.

Duplicate of #762

@dghubble dghubble closed this Oct 11, 2021
@icedream
Copy link
Author

Understandable, though for my situation I will continue to use the code I wrote for now - I don't have anything of an existing solution such as Terraform or similar, so I'm using Matchbox and its templating system as a first step into automating parts of the infrastructure deployment. Maybe on the long haul we can turn to those tools.

Thank you anyways, really helpful software!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants