1 branch

README.md

capi-bootstrap-ignition

A minimal CAPI bootstrap provider that references a pre-existing Secret containing an ignition config. Designed for OpenShift clusters where the worker ignition is fetched from the Machine Config Server.

How it works

  1. User fetches worker ignition from the MCS and stores it in a Secret
  2. User creates an IgnitionConfig resource referencing that Secret
  3. This controller copies the data into the format CAPI expects and reports status.ready: true
  4. CAPI sees the bootstrap is ready and proceeds with machine provisioning

Usage

Fetch the worker ignition and create a source Secret:

ssh core@<node> "sudo curl -sk \
  -H 'Accept: application/vnd.coreos.ignition+json;version=3.2.0' \
  https://localhost:22623/config/worker" > worker-ignition.json

kubectl create secret generic worker-ignition \
  --from-file=value=worker-ignition.json

Create an IgnitionConfig:

apiVersion: bootstrap.cluster.x-k8s.io/v1alpha1
kind: IgnitionConfig
metadata:
  name: my-worker
spec:
  secretRef:
    name: worker-ignition

Reference it from a CAPI Machine or 5-Spot ScheduledMachine:

bootstrapSpec:
  apiVersion: bootstrap.cluster.x-k8s.io/v1alpha1
  kind: IgnitionConfig
  spec:
    secretRef:
      name: worker-ignition

One source Secret serves all workers in the cluster.

License

Apache License, Version 2.0