Skip to content

Commit

Permalink
pass k8s version to kube-apiserver render during bootstrap
Browse files Browse the repository at this point in the history
to allow enabling different API groups versions according to the k8s
version
  • Loading branch information
atiratree committed Sep 6, 2024
1 parent 0f97bdc commit 58a7d55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ elif [ -f $IDMS_MANIFEST_FILE ]; then
fi

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

if [ ! -f api-bootstrap.done ]
then
Expand Down Expand Up @@ -228,7 +229,8 @@ then
--cluster-auth-file=/assets/manifests/cluster-authentication-02-config.yaml \
--infra-config-file=/assets/manifests/cluster-infrastructure-02-config.yml \
--rendered-manifest-files=/assets/manifests \
--payload-version=$VERSION
--payload-version=$VERSION \
--operand-kubernetes-version="${KUBERNETES_VERSION}"

cp kube-apiserver-bootstrap/config /etc/kubernetes/bootstrap-configs/kube-apiserver-config.yaml
cp kube-apiserver-bootstrap/bootstrap-manifests/* bootstrap-manifests/
Expand Down

0 comments on commit 58a7d55

Please sign in to comment.