Skip to content

Commit

Permalink
Merge pull request #1187 from deads2k/render-cluster-config
Browse files Browse the repository at this point in the history
bootkube: render config.openshift.io resources
  • Loading branch information
deads2k committed Feb 14, 2019
2 parents 73e10ff + 9994d37 commit e1082a3
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 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 @@ -24,6 +24,7 @@ MACHINE_CONFIG_OSCONTENT=$(podman run --rm ${release} image machine-os-content)
MACHINE_CONFIG_ETCD_IMAGE=$(podman run --rm ${release} image etcd)
MACHINE_CONFIG_SETUP_ETCD_ENV_IMAGE=$(podman run --rm ${release} image setup-etcd-environment)

CONFIG_OPERATOR_IMAGE=$(podman run --rm ${release} image cluster-config-operator)
KUBE_APISERVER_OPERATOR_IMAGE=$(podman run --rm ${release} image cluster-kube-apiserver-operator)
KUBE_CONTROLLER_MANAGER_OPERATOR_IMAGE=$(podman run --rm ${release} image cluster-kube-controller-manager-operator)
KUBE_SCHEDULER_OPERATOR_IMAGE=$(podman run --rm ${release} image cluster-kube-scheduler-operator)
Expand Down Expand Up @@ -53,6 +54,23 @@ then
cp auth/kubeconfig /etc/kubernetes/kubeconfig
fi

if [ ! -d config-bootstrap ]
then
echo "Rendering cluster config manifests..."

# shellcheck disable=SC2154
podman run \
--volume "$PWD:/assets:z" \
"${CONFIG_OPERATOR_IMAGE}" \
/usr/bin/cluster-config-operator render \
--config-output-file=/assets/config-bootstrap/config \
--asset-input-dir=/assets/tls \
--asset-output-dir=/assets/config-bootstrap

cp config-bootstrap/bootstrap-manifests/* bootstrap-manifests/
cp config-bootstrap/manifests/* manifests/
fi

if [ ! -d kube-apiserver-bootstrap ]
then
echo "Rendering Kubernetes API server core manifests..."
Expand Down

0 comments on commit e1082a3

Please sign in to comment.