From f456dd7b91e09e4a0329b533f667b862e238145a Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Mon, 9 Oct 2023 13:14:46 +0200 Subject: [PATCH 1/3] ci: disable addons after cluster creation It looks like disabling addson pre cluster creation is not working, Moving the disable addons to post cluster creation. Signed-off-by: Madhu Rajanna --- scripts/minikube.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/minikube.sh b/scripts/minikube.sh index f4a332209cc..32202b757ce 100755 --- a/scripts/minikube.sh +++ b/scripts/minikube.sh @@ -255,8 +255,6 @@ up) install_podman_wrapper fi - disable_storage_addons - # get kubernetes version we are operating on and accordingly enable feature gates KUBE_MAJOR=$(kube_version 1) KUBE_MINOR=$(kube_version 2) @@ -283,6 +281,7 @@ up) if [[ "${VM_DRIVER}" = "podman" ]]; then ${minikube} ssh "sudo mount -oremount,rw /sys" fi + disable_storage_addons ${minikube} kubectl -- cluster-info ;; down) From d291740d59df62ed5abe7e82cb33ce734d2dc19c Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Mon, 9 Oct 2023 13:23:19 +0200 Subject: [PATCH 2/3] ci: remove support for older version of Rook As we are having latest version of Rook, Removing the support for pretty older version of Rook. Signed-off-by: Madhu Rajanna --- scripts/rook.sh | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/scripts/rook.sh b/scripts/rook.sh index 1286e134157..2c0e4cdaf37 100755 --- a/scripts/rook.sh +++ b/scripts/rook.sh @@ -2,8 +2,7 @@ ROOK_VERSION=${ROOK_VERSION:-"v1.6.2"} ROOK_DEPLOY_TIMEOUT=${ROOK_DEPLOY_TIMEOUT:-300} -ROOK_URL="https://raw.githubusercontent.com/rook/rook/${ROOK_VERSION}/" -ROOK_DEPLOYMENT_PATH="cluster/examples/kubernetes/ceph" +ROOK_URL="https://raw.githubusercontent.com/rook/rook/${ROOK_VERSION}/deploy/examples" ROOK_BLOCK_POOL_NAME=${ROOK_BLOCK_POOL_NAME:-"newrbdpool"} ROOK_BLOCK_EC_POOL_NAME=${ROOK_BLOCK_EC_POOL_NAME:-"ec-pool"} @@ -30,31 +29,10 @@ function log_errors() { exit 1 } -rook_version() { - echo "${ROOK_VERSION#v}" | cut -d'.' -f"${1}" -} - -function update_rook_url() { - ROOK_MAJOR=$(rook_version 1) - ROOK_MINOR=$(rook_version 2) - - # If rook version is => 1.8 update deployment path. - if [ "${ROOK_MAJOR}" -eq 1 ] && [ "${ROOK_MINOR}" -ge 8 ]; then - ROOK_DEPLOYMENT_PATH="deploy/examples" - fi - ROOK_URL+=${ROOK_DEPLOYMENT_PATH} -} - function deploy_rook() { kubectl_retry create -f "${ROOK_URL}/common.yaml" + kubectl_retry create -f "${ROOK_URL}/crds.yaml" - ROOK_MAJOR=$(rook_version 1) - ROOK_MINOR=$(rook_version 2) - - # If rook version is > 1.5 , we will apply CRDs. - if [ "${ROOK_MAJOR}" -eq 1 ] && [ "${ROOK_MINOR}" -ge 5 ]; then - kubectl_retry create -f "${ROOK_URL}/crds.yaml" - fi TEMP_DIR="$(mktemp -d)" curl -o "${TEMP_DIR}/operator.yaml" "${ROOK_URL}/operator.yaml" # disable rook deployed csi drivers @@ -106,12 +84,8 @@ function teardown_rook() { kubectl delete -f "${ROOK_URL}/toolbox.yaml" kubectl delete -f "${ROOK_URL}/cluster-test.yaml" kubectl delete -f "${ROOK_URL}/operator.yaml" - ROOK_MAJOR=$(rook_version 1) - ROOK_MINOR=$(rook_version 2) - if [ "${ROOK_MAJOR}" -eq 1 ] && [ "${ROOK_MINOR}" -ge 5 ]; then - kubectl delete -f "${ROOK_URL}/crds.yaml" - fi kubectl delete -f "${ROOK_URL}/common.yaml" + kubectl delete -f "${ROOK_URL}/crds.yaml" } function create_block_pool() { @@ -252,9 +226,6 @@ function check_rbd_stat() { echo "" } -# update rook URL before doing any operation. -update_rook_url - case "${1:-}" in deploy) deploy_rook From d19b0acfb245b55e124dd51a91c0b7e43bd4fddd Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Mon, 9 Oct 2023 13:26:48 +0200 Subject: [PATCH 3/3] ci: update Rook to latest release Update the Rook to point to the latest release as script support it. Signed-off-by: Madhu Rajanna --- scripts/rook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rook.sh b/scripts/rook.sh index 2c0e4cdaf37..bb02fd85438 100755 --- a/scripts/rook.sh +++ b/scripts/rook.sh @@ -1,6 +1,6 @@ #!/bin/bash -E -ROOK_VERSION=${ROOK_VERSION:-"v1.6.2"} +ROOK_VERSION=${ROOK_VERSION:-"v1.12.5"} ROOK_DEPLOY_TIMEOUT=${ROOK_DEPLOY_TIMEOUT:-300} ROOK_URL="https://raw.githubusercontent.com/rook/rook/${ROOK_VERSION}/deploy/examples" ROOK_BLOCK_POOL_NAME=${ROOK_BLOCK_POOL_NAME:-"newrbdpool"}