Skip to content

Declarative Cloud-Init Injection on Provisioned Hosts #2706

@PDCuong

Description

@PDCuong

User Story

As a cluster operator I would like to inject fresh cloud-init userData/networkData into a BareMetalHost that is already provisioned—whether it was provisioned by Metal3 (externalProvisioner: false) or adopted into Ironic (externalProvisioner: true)—so that I can reboot the existing OS, run a new cloud-init script, and avoid a full OS reprovision.

Detailed Description

There is no built-in, declarative BMH API to:
1 .Update spec.userData/spec.networkData on a host in the Provisioned/Active state.
2. Trigger Ironic’s adopt + config-drive (deploy interface’s prepare & take_over) or a partial deploy (inject config-drive + reboot) directly from Kubernetes.
3. Do so without wiping or redeploying the existing OS image.

Currently, Changing spec.image currently triggers the full clean → deploy cycle and overwrites the disk, which is exactly what we want to avoid for simple cloud-init re-injection.

Anything else you would like to add:
Ironic already supports these workflows via CLI:

openstack baremetal node set-provision-state adopt --config-drive …

Custom deploy-steps skipping write_image + --config-drive

A declarative BMH or annotations (e.g. spec.cloudInitInject: true) would let BMO watch for changes, call the right Ironic action, and update status conditions

/kind feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem rightkind/featureCategorizes issue or PR as related to a new feature.needs-triageIndicates an issue lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions