Skip to content

Commit

Permalink
data/bootstrap/files/usr/local/bin/bootkube: Drop config CRDs
Browse files Browse the repository at this point in the history
We've had config-operator rendering on the bootstrap node since
9994d37 (bootkube: render config.openshift.io resources,
2019-02-12, openshift#1187).  Motivation for that commit isn't clear to me; [1]
suggests maybe keeping CRDs out of the installer repository.  But we
run a rendered cluster-version operator on the bootstrap machine since
63e2750 (ignition: add CVO render to bootkube.sh, 2018-09-27, openshift#330),
so we should be able to push resources at bootstrap time via the CVO.
Remove CRDs from the config rendering, so we can see if things work
without the config-rendered cluster-bootstrap pushes racing the
bootstrap CVO pushes, or the config-rendered pushes not realizing they
should filter out manifests annotated for capabilities that are not
enabled.

[1]: openshift#1187 (comment)
  • Loading branch information
wking committed Oct 12, 2023
1 parent 6a7ddfe commit 1f115ab
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ MACHINE_CONFIG_ETCD_IMAGE=$(image_for etcd)
MACHINE_CONFIG_INFRA_IMAGE=$(image_for pod)

CLUSTER_ETCD_OPERATOR_IMAGE=$(image_for cluster-etcd-operator)
CONFIG_OPERATOR_IMAGE=$(image_for cluster-config-operator)
KUBE_APISERVER_OPERATOR_IMAGE=$(image_for cluster-kube-apiserver-operator)
KUBE_CONTROLLER_MANAGER_OPERATOR_IMAGE=$(image_for cluster-kube-controller-manager-operator)
KUBE_SCHEDULER_OPERATOR_IMAGE=$(image_for cluster-kube-scheduler-operator)
Expand Down Expand Up @@ -86,38 +85,6 @@ fi

VERSION="$(oc adm release info -o 'jsonpath={.metadata.version}' "${MIRROR_FLAG}" "${RELEASE_IMAGE_DIGEST}")"

if [ ! -f config-bootstrap.done ]
then
record_service_stage_start "config-bootstrap"
echo "Rendering cluster config manifests..."

rm --recursive --force config-bootstrap

ADDITIONAL_FLAGS=()
if [ -f "$PWD/manifests/cloud-provider-config.yaml" ]; then
ADDITIONAL_FLAGS+=("--cloud-provider-config-input-file=/assets/manifests/cloud-provider-config.yaml")
fi

bootkube_podman_run \
--name config-render \
--volume "$PWD:/assets:z" \
"${CONFIG_OPERATOR_IMAGE}" \
/usr/bin/cluster-config-operator render \
--cluster-infrastructure-input-file=/assets/manifests/cluster-infrastructure-02-config.yml \
--cloud-provider-config-output-file=/assets/config-bootstrap/cloud-provider-config-generated.yaml \
--config-output-file=/assets/config-bootstrap/config \
--asset-input-dir=/assets/tls \
--asset-output-dir=/assets/config-bootstrap \
--rendered-manifest-files=/assets/manifests \
--payload-version=$VERSION \
"${ADDITIONAL_FLAGS[@]}"

cp config-bootstrap/manifests/* manifests/

touch config-bootstrap.done
record_service_stage_success
fi

if [ ! -f cvo-bootstrap.done ]
then
record_service_stage_start "cvo-bootstrap"
Expand Down

0 comments on commit 1f115ab

Please sign in to comment.