bottlerocket-os / bottlerocket

An operating system designed for hosting containers
https://bottlerocket.dev
Other
8.64k stars 508 forks source link

migrate to settings plugins and eliminate variant-based conditional compilation #4038

Closed bcressey closed 3 months ago

bcressey commented 3 months ago

Issue number: Closes: #3615

Description of changes:

Some major long-term efforts culminate here:

  1. Move all the distinct settings models into settings plugins.
  2. Make apiserver / datastore / models work with settings plugins.
  3. Move all the distinct variant defaults into settings defaults crates.
  4. Teach storewolf to load defaults at runtime.
  5. Add new packages and dependencies to pull in the correct plugin and defaults for each variant.

The end result of this is that os is no longer compiled differently based on the variant being built, and everything still works.

Testing done: Built aws-dev and aws-k8s-1.28-nvidia. Verified that they used the expected defaults and supported the correct settings.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

bcressey commented 3 months ago

I still need to rebase, but the above force push uses the tagged v0.1.0 release of bottlerocket-settings-sdk, and addresses feedback so far: