mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-26 08:10:20 +00:00
ci: reorder function declaration in minikube script
In this script we defined all the functions at the top and then started with executable commands (entry points to script start). Only this function is odd in the script unlike the rest of them, defined in between the execution sequence taking away the readability. Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
parent
ce93c02525
commit
c98cc68f9d
@ -47,7 +47,6 @@ function detect_minikube() {
|
|||||||
# default if minikube is not available
|
# default if minikube is not available
|
||||||
echo '/usr/local/bin/minikube'
|
echo '/usr/local/bin/minikube'
|
||||||
}
|
}
|
||||||
minikube="$(detect_minikube)"
|
|
||||||
|
|
||||||
# install minikube
|
# install minikube
|
||||||
function install_minikube() {
|
function install_minikube() {
|
||||||
@ -99,6 +98,19 @@ function minikube_losetup() {
|
|||||||
${minikube} ssh 'sudo sh -c "rm -f /sbin/losetup && cp ~docker/losetup /sbin"'
|
${minikube} ssh 'sudo sh -c "rm -f /sbin/losetup && cp ~docker/losetup /sbin"'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function minikube_supports_psp() {
|
||||||
|
local MINIKUBE_MAJOR
|
||||||
|
local MINIKUBE_MINOR
|
||||||
|
local MINIKUBE_PATCH
|
||||||
|
MINIKUBE_MAJOR=$(minikube_version 1)
|
||||||
|
MINIKUBE_MINOR=$(minikube_version 2)
|
||||||
|
MINIKUBE_PATCH=$(minikube_version 3)
|
||||||
|
if [[ "${MINIKUBE_MAJOR}" -ge 1 ]] && [[ "${MINIKUBE_MINOR}" -ge 11 ]] && [[ "${MINIKUBE_PATCH}" -ge 1 ]] || [[ "${MINIKUBE_MAJOR}" -ge 1 ]] && [[ "${MINIKUBE_MINOR}" -ge 12 ]]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
# configure minikube
|
# configure minikube
|
||||||
MINIKUBE_ARCH=${MINIKUBE_ARCH:-"amd64"}
|
MINIKUBE_ARCH=${MINIKUBE_ARCH:-"amd64"}
|
||||||
MINIKUBE_VERSION=${MINIKUBE_VERSION:-"latest"}
|
MINIKUBE_VERSION=${MINIKUBE_VERSION:-"latest"}
|
||||||
@ -136,18 +148,7 @@ EXTRA_CONFIG="${EXTRA_CONFIG} --extra-config=kubelet.resolv-conf=${RESOLV_CONF}"
|
|||||||
#extra Rook configuration
|
#extra Rook configuration
|
||||||
ROOK_BLOCK_POOL_NAME=${ROOK_BLOCK_POOL_NAME:-"newrbdpool"}
|
ROOK_BLOCK_POOL_NAME=${ROOK_BLOCK_POOL_NAME:-"newrbdpool"}
|
||||||
|
|
||||||
function minikube_supports_psp() {
|
minikube="$(detect_minikube)"
|
||||||
local MINIKUBE_MAJOR
|
|
||||||
local MINIKUBE_MINOR
|
|
||||||
local MINIKUBE_PATCH
|
|
||||||
MINIKUBE_MAJOR=$(minikube_version 1)
|
|
||||||
MINIKUBE_MINOR=$(minikube_version 2)
|
|
||||||
MINIKUBE_PATCH=$(minikube_version 3)
|
|
||||||
if [[ "${MINIKUBE_MAJOR}" -ge 1 ]] && [[ "${MINIKUBE_MINOR}" -ge 11 ]] && [[ "${MINIKUBE_PATCH}" -ge 1 ]] || [[ "${MINIKUBE_MAJOR}" -ge 1 ]] && [[ "${MINIKUBE_MINOR}" -ge 12 ]]; then
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
case "${1:-}" in
|
case "${1:-}" in
|
||||||
up)
|
up)
|
||||||
|
Loading…
Reference in New Issue
Block a user