Add support for bootc images in lifecycle-agent #815
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.
Background / Context
Currently, LCA creates a seed image that is simply a bunch of files inside an empty container. Then during the deployment from a seed image LCA uses ostree-ext to pull the RHCOS container image corresponding to the seed image, creates a new stateroot from it, and then unpacks the seed image contents on top of that new stateroot.
Issue / Requirement / Reason for change
We do not leverage bootc for this, which could simplify some things and allow new possibilities.
Solution / Feature Overview
Following recent changes in bootc, we could now instead use bootc to install the seed image directly to a new stateroot.
This PR adds a new possible
SeedGenerator
CR annotationunsupported-experimental.lca.openshift.io/use-bootc
that accepts only the valueUse
. If this annotation is present with this value, LCA will generate a seed image that is a valid bootc image. LCA will label the resulting image (at the OCI level) with a special label that identifies it as a bootc seed image.Then, during deployment, LCA will check if the image is a bootc seed image (by inspecting said label) and if so, it will use bootc to install the seed image directly to a new stateroot.
Implementation Details
Nothing complicated, just new code paths
Other Information
This is still experimental and unsupported, hence the label name. We should do some heavy testing and develop this further before letting anyone use it in production.
Those bootc seed images can also be used with IBI using a simple Containerfile that adds the cluster configuration to the seed image, which will allow users to configure a cluster using a Containerfile and then simply switch to it like any other bootc image.