Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ COREDNS_IMAGE=$(image_for coredns)
HAPROXY_IMAGE=$(image_for haproxy-router)
BAREMETAL_RUNTIMECFG_IMAGE=$(image_for baremetal-runtimecfg)

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

mkdir --parents ./{bootstrap-manifests,manifests}

if [ ! -f openshift-manifests.done ]
Expand All @@ -78,6 +80,7 @@ then
record_service_stage_success
fi


if [ ! -f config-bootstrap.done ]
then
record_service_stage_start "config-bootstrap"
Expand All @@ -92,7 +95,6 @@ then
{{- if .FeatureSet }}
ADDITIONAL_FLAGS+=("--feature-set={{.FeatureSet}}")
{{- end}}
VERSION="$(oc adm release info -o 'jsonpath={.metadata.version}' "${RELEASE_IMAGE_DIGEST}")"

bootkube_podman_run \
--name config-render \
Expand Down Expand Up @@ -179,11 +181,6 @@ then

rm --recursive --force kube-apiserver-bootstrap

ADDITIONAL_FLAGS=()
{{- if .FeatureSet }}
ADDITIONAL_FLAGS+=("--feature-set={{.FeatureSet}}")
{{- end}}

bootkube_podman_run \
--name kube-apiserver-render \
--volume "$PWD:/assets:z" \
Expand All @@ -199,7 +196,8 @@ then
--cluster-config-file=/assets/manifests/cluster-network-02-config.yml \
--cluster-auth-file=/assets/manifests/cluster-authentication-02-config.yaml \
--infra-config-file=/assets/manifests/cluster-infrastructure-02-config.yml \
"${ADDITIONAL_FLAGS[@]}"
--rendered-manifest-files=/assets/manifests \
--payload-version=$VERSION
Comment on lines +199 to +200
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not need the same for KCMO below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now updated.


cp kube-apiserver-bootstrap/config /etc/kubernetes/bootstrap-configs/kube-apiserver-config.yaml
cp kube-apiserver-bootstrap/bootstrap-manifests/* bootstrap-manifests/
Expand All @@ -216,10 +214,6 @@ then

rm --recursive --force kube-controller-manager-bootstrap

ADDITIONAL_FLAGS=()
{{- if .FeatureSet }}
ADDITIONAL_FLAGS+=("--feature-set={{.FeatureSet}}")
{{- end}}

bootkube_podman_run \
--name kube-controller-render \
Expand All @@ -233,7 +227,8 @@ then
--config-output-file=/assets/kube-controller-manager-bootstrap/config \
--cpc-config-output-file=/assets/kube-controller-manager-bootstrap/cpc-config \
--cluster-config-file=/assets/manifests/cluster-network-02-config.yml \
"${ADDITIONAL_FLAGS[@]}"
--rendered-manifest-files=/assets/manifests \
--payload-version=$VERSION

cp kube-controller-manager-bootstrap/config /etc/kubernetes/bootstrap-configs/kube-controller-manager-config.yaml
cp kube-controller-manager-bootstrap/cpc-config /etc/kubernetes/bootstrap-configs/cluster-policy-controller-config.yaml
Expand Down