From 58a7d55b2e8901d75e9aab5a6c3273122e7c189e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20K=C5=99epinsk=C3=BD?= Date: Fri, 6 Sep 2024 11:18:09 +0200 Subject: [PATCH] pass k8s version to kube-apiserver render during bootstrap to allow enabling different API groups versions according to the k8s version --- data/data/bootstrap/files/usr/local/bin/bootkube.sh.template | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template b/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template index c3d64abb1ea..ec9c63eb91b 100755 --- a/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template +++ b/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template @@ -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 @@ -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/