mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-26 00:00:23 +00:00
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 <madhupr007@gmail.com>
This commit is contained in:
parent
8edbc5c544
commit
8d4b751402
@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
ROOK_VERSION=${ROOK_VERSION:-"v1.6.2"}
|
ROOK_VERSION=${ROOK_VERSION:-"v1.6.2"}
|
||||||
ROOK_DEPLOY_TIMEOUT=${ROOK_DEPLOY_TIMEOUT:-300}
|
ROOK_DEPLOY_TIMEOUT=${ROOK_DEPLOY_TIMEOUT:-300}
|
||||||
ROOK_URL="https://raw.githubusercontent.com/rook/rook/${ROOK_VERSION}/"
|
ROOK_URL="https://raw.githubusercontent.com/rook/rook/${ROOK_VERSION}/deploy/examples"
|
||||||
ROOK_DEPLOYMENT_PATH="cluster/examples/kubernetes/ceph"
|
|
||||||
ROOK_BLOCK_POOL_NAME=${ROOK_BLOCK_POOL_NAME:-"newrbdpool"}
|
ROOK_BLOCK_POOL_NAME=${ROOK_BLOCK_POOL_NAME:-"newrbdpool"}
|
||||||
ROOK_BLOCK_EC_POOL_NAME=${ROOK_BLOCK_EC_POOL_NAME:-"ec-pool"}
|
ROOK_BLOCK_EC_POOL_NAME=${ROOK_BLOCK_EC_POOL_NAME:-"ec-pool"}
|
||||||
|
|
||||||
@ -30,31 +29,10 @@ function log_errors() {
|
|||||||
exit 1
|
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() {
|
function deploy_rook() {
|
||||||
kubectl_retry create -f "${ROOK_URL}/common.yaml"
|
kubectl_retry create -f "${ROOK_URL}/common.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"
|
kubectl_retry create -f "${ROOK_URL}/crds.yaml"
|
||||||
fi
|
|
||||||
TEMP_DIR="$(mktemp -d)"
|
TEMP_DIR="$(mktemp -d)"
|
||||||
curl -o "${TEMP_DIR}/operator.yaml" "${ROOK_URL}/operator.yaml"
|
curl -o "${TEMP_DIR}/operator.yaml" "${ROOK_URL}/operator.yaml"
|
||||||
# disable rook deployed csi drivers
|
# disable rook deployed csi drivers
|
||||||
@ -106,12 +84,8 @@ function teardown_rook() {
|
|||||||
kubectl delete -f "${ROOK_URL}/toolbox.yaml"
|
kubectl delete -f "${ROOK_URL}/toolbox.yaml"
|
||||||
kubectl delete -f "${ROOK_URL}/cluster-test.yaml"
|
kubectl delete -f "${ROOK_URL}/cluster-test.yaml"
|
||||||
kubectl delete -f "${ROOK_URL}/operator.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}/common.yaml"
|
||||||
|
kubectl delete -f "${ROOK_URL}/crds.yaml"
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_block_pool() {
|
function create_block_pool() {
|
||||||
@ -252,9 +226,6 @@ function check_rbd_stat() {
|
|||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
# update rook URL before doing any operation.
|
|
||||||
update_rook_url
|
|
||||||
|
|
||||||
case "${1:-}" in
|
case "${1:-}" in
|
||||||
deploy)
|
deploy)
|
||||||
deploy_rook
|
deploy_rook
|
||||||
|
Loading…
Reference in New Issue
Block a user