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.
- User fetches worker ignition from the MCS and stores it in a Secret
- User creates an
IgnitionConfigresource referencing that Secret - This controller copies the data into the format CAPI expects and
reports
status.ready: true - CAPI sees the bootstrap is ready and proceeds with machine provisioning
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.jsonCreate an IgnitionConfig:
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha1
kind: IgnitionConfig
metadata:
name: my-worker
spec:
secretRef:
name: worker-ignitionReference it from a CAPI Machine or 5-Spot ScheduledMachine:
bootstrapSpec:
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha1
kind: IgnitionConfig
spec:
secretRef:
name: worker-ignitionOne source Secret serves all workers in the cluster.
Apache License, Version 2.0