mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 11:50:18 +00:00
deploy: re-alignment of code in rook.sh
currently, rook.sh code is not aligned properly unside the functions, this commit does the code alignment. PS: this is done by vscode for me :) Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
901a1368ab
commit
c32bf71846
@ -36,11 +36,11 @@ rook_version() {
|
||||
function deploy_rook() {
|
||||
kubectl_retry create -f "${ROOK_URL}/common.yaml"
|
||||
|
||||
# If rook version is > 1.5 , we will apply CRDs.
|
||||
ROOK_MAJOR=$(rook_version 1)
|
||||
ROOK_MINOR=$(rook_version 2)
|
||||
if [ "${ROOK_MAJOR}" -eq 1 ] && [ "${ROOK_MINOR}" -ge 5 ];
|
||||
then
|
||||
|
||||
# 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)"
|
||||
@ -51,8 +51,7 @@ function deploy_rook() {
|
||||
|
||||
kubectl_retry create -f "${TEMP_DIR}/operator.yaml"
|
||||
# Override the ceph version which rook installs by default.
|
||||
if [ -z "${ROOK_CEPH_CLUSTER_IMAGE}" ]
|
||||
then
|
||||
if [ -z "${ROOK_CEPH_CLUSTER_IMAGE}" ]; then
|
||||
kubectl_retry create -f "${ROOK_URL}/cluster-test.yaml"
|
||||
else
|
||||
ROOK_CEPH_CLUSTER_VERSION_IMAGE_PATH="image: ${ROOK_CEPH_CLUSTER_IMAGE}"
|
||||
@ -94,8 +93,7 @@ function teardown_rook() {
|
||||
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
|
||||
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"
|
||||
@ -192,8 +190,11 @@ function check_rbd_stat() {
|
||||
|
||||
TOOLBOX_POD=$(kubectl_retry -n rook-ceph get pods -l app=rook-ceph-tools -o jsonpath='{.items[0].metadata.name}')
|
||||
TOOLBOX_POD_STATUS=$(kubectl_retry -n rook-ceph get pod "$TOOLBOX_POD" -ojsonpath='{.status.phase}')
|
||||
[[ "$TOOLBOX_POD_STATUS" != "Running" ]] && \
|
||||
{ echo "Toolbox POD ($TOOLBOX_POD) status: [$TOOLBOX_POD_STATUS]"; continue; }
|
||||
[[ "$TOOLBOX_POD_STATUS" != "Running" ]] &&
|
||||
{
|
||||
echo "Toolbox POD ($TOOLBOX_POD) status: [$TOOLBOX_POD_STATUS]"
|
||||
continue
|
||||
}
|
||||
|
||||
if kubectl_retry exec -n rook-ceph "$TOOLBOX_POD" -it -- rbd pool stats "$RBD_POOL_NAME" &>/dev/null; then
|
||||
echo "RBD ($RBD_POOL_NAME) is successfully created..."
|
||||
|
Loading…
Reference in New Issue
Block a user