Skip to content

Conversation

@umohnani8
Copy link
Contributor

- What I did

- How to verify it

- Description for the changelog

Add install time support for Image Mode by using a pre-built custom OS
container image with the MachineOSConfig CR created at install time in
the manifests directory.

**Core Workflow:**
1. Bootstrap: Creates component MachineConfig (10-prebuiltimage-osimageurl-<pool>)
   that sets osImageURL from MOSC annotation
2. Cluster startup: Seeding workflow creates synthetic MachineOSBuild with
   success status
3. Post-install: Normal OCL workflows handle MC changes and image updates

**Seeding Implementation:**
- Annotation-driven detection in addMachineOSConfig()
- seedMachineOSConfigWithExistingImage() orchestrates seeding workflow
- createSyntheticMachineOSBuild() generates synthetic MOSB marked as successful
- updateMachineOSConfigForSeeding() updates MOSC status and annotations
- Adds "Seeded" condition and PreBuiltImageSeededAnnotationKey marker
- PreBuiltImageAnnotationKey remains on MOSC for component MC management

**Bootstrap Integration:**
- Recognizes MachineOSConfig manifests during bootstrap processing
- Creates component MachineConfigs that set osImageURL for each pool
- Component MCs are merged into rendered MCs by render controller
- Validates pre-built image format (requires digest @sha256:)

**Operator Sync:**
- syncPreBuiltImageMachineConfigs() manages component MC lifecycle
- Creates/updates component MCs based on MOSC annotations
- Deletes component MCs when annotation is removed from MOSC

**Install-Time Guards:**
- Handles empty MCP status.configuration.name during pool convergence
- Skips rendered config comparison when status.configuration.name is empty
- Prevents MachineConfig lookups with empty names at install time
- Node controller uses current-machine-os-build annotation for MOSB lookup

**Key Components:**
- PreBuiltImageAnnotationKey: Triggers seeding, persists for component MC management
- PreBuiltImageSeededAnnotationKey: Tracks seeding completion
- PreBuiltImageLabelKey: Labels synthetic MachineOSBuilds
- "Seeded" condition: Status indicator for successfully seeded MOSCs

**Testing:**
- Comprehensive unit tests for seeding workflow
- Bootstrap test validation with example manifest
- Tests for annotation detection and routing logic

Signed-off-by: Urvashi <[email protected]>
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 11, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 11, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: umohnani8

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 11, 2025
@umohnani8 umohnani8 force-pushed the reboot-noanno branch 2 times, most recently from 414bb7a to 266c68a Compare November 12, 2025 10:48
Signed-off-by: Urvashi <[email protected]>
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 13, 2025
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants