Skip to content

Commit

Permalink
bootkube: Inject bootstrap MachineConfigs into cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
cgwalters committed Jan 16, 2020
1 parent 77d20c8 commit 477a20d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,15 @@ echo "etcd cluster up. Killing etcd certificate signer..."

podman rm --force etcd-signer
rm --force /etc/kubernetes/manifests/machineconfigoperator-bootstrap-pod.yaml
# Copy the bootstrap MCs to inject into the target cluster
# Yes this is a brutal hack, need to improve the MCC bootstrap above
# 9a so we're after 99 - should change the others to 50- or something?
for x in /etc/mcs/bootstrap/machine-configs/*.yaml; do
bn=$(basename $x)
(echo 'apiVersion: machineconfiguration.openshift.io/v1'
echo 'kind: MachineConfig'
python -c 'import sys,yaml; d=yaml.load(open(sys.argv[1])); del d["metadata"]["ownerReferences"]; yaml.dump(d, sys.stdout)' $x) > /opt/openshift/openshift/9a-${bn}
done

echo "Starting cluster-bootstrap..."

Expand Down

0 comments on commit 477a20d

Please sign in to comment.