Skip to content

FCOS config versioning #89

@ajeddeloh

Description

@ajeddeloh

Background

CL has the Container Linux Config Transpiler or ct for short. Since users should not be writing Ignition configs by hand, they write Container Linux Configs (CLCs) which ct then renders into an Ignition config. This scheme has a few advantages:

  • Forces users to validate their configs
  • Allows easy addition of sugar for common operations
  • Allows for adding OS specific bits without making the Ignition spec OS specific
  • Allows users to write configs in yaml but keeps the configs that Ignition ingests in json

CLCs are currently unversioned. This is a problem since users don't know what the backwards compatibility promises are for their configs. So far we haven't needed to break compatibility and with CL's EOL in ~1 year we don't plan to need to. FCOS however should get this right from the start.

Cost of supporting multiple versions

Supporting more than one ct config version at a time is not free. There are a couple approaches:

  • Translation to newest config version: This is what Ignition does. The translation code is very verbose but it avoids duplicating the translation logic.
  • Carry logic for multiple versions independently: This makes it much easier to make a new config version but means that changes to the translation logic must be backported to older versions

Targeting Ignition versions

Another question is what version of the Ignition spec to target. CLCT currently targets whatever is the most recent version supported by CL's stable channel. This is also not ideal since new versions in alpha don't gain support until the update propagates to stable. Ideally we would support targeting any version (and error out if the config requires a newer version) but it's unclear if that is worth the effort or not.

A few proposals:

  1. Don't version it: We break compat arbitrarily when we need to and tell users to "fix your configs". I'm not a fan of this one.
  2. Version in lock-step with the Ignition config: Have a version field that maps directly to the version of the Ignition config that will be generated. New features/sugar would go in the most recent spec version. This is easier to implement but means that users would need to keep their ct version up to date to take advantage of new features and that just because a version of fcosct accepts an fcosc with version X it wouldn't necessarily accept all configs with version X.
  3. Do the Ignition-style translation dance: Have the fcosc spec version be independent of the Ignition spec version. When a user hands fcosct an old config it is translated up to the latest version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions