Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
Signed-off-by: Dale Haiducek <[email protected]>
  • Loading branch information
dhaiducek committed Jan 6, 2025
1 parent eea8671 commit 80a1d42
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions build/manage-clusters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi

# Number of managed clusters
MANAGED_CLUSTER_COUNT="${MANAGED_CLUSTER_COUNT:-1}"
if [[ -n "${MANAGED_CLUSTER_COUNT//[0-9]}" ]] || [[ "${MANAGED_CLUSTER_COUNT}" == "0" ]]; then
if [[ -n "${MANAGED_CLUSTER_COUNT//[0-9]/}" ]] || [[ "${MANAGED_CLUSTER_COUNT}" == "0" ]]; then
echo "error: provided MANAGED_CLUSTER_COUNT is not a nonzero integer"
exit 1
fi
Expand All @@ -23,21 +23,21 @@ export KIND_NAME="${KIND_PREFIX}1"
export CLUSTER_NAME="${CLUSTER_PREFIX}1"
# Deploy the hub cluster as cluster1
case ${RUN_MODE} in
delete)
make kind-delete-cluster
;;
debug)
make e2e-debug
;;
create)
make kind-deploy-controller
;;
create-dev)
make kind-prep-ocm
;;
deploy-addons)
make kind-deploy-addons
;;
delete)
make kind-delete-cluster
;;
debug)
make e2e-debug
;;
create)
make kind-deploy-controller
;;
create-dev)
make kind-prep-ocm
;;
deploy-addons)
make kind-deploy-addons
;;
esac

if [[ "${RUN_MODE}" == "create" || "${RUN_MODE}" == "create-dev" ]]; then
Expand All @@ -49,31 +49,31 @@ if [[ "${RUN_MODE}" == "create" || "${RUN_MODE}" == "create-dev" ]]; then
fi

# Deploy a variable number of managed clusters starting with cluster2
for i in $(seq 2 $((MANAGED_CLUSTER_COUNT+1))); do
for i in $(seq 2 $((MANAGED_CLUSTER_COUNT + 1))); do
export KIND_NAME="${KIND_PREFIX}${i}"
export CLUSTER_NAME="${CLUSTER_PREFIX}${i}"
export KLUSTERLET_NAME="${CLUSTER_NAME}-klusterlet"

case ${RUN_MODE} in
delete)
make kind-delete-cluster
;;
debug)
make e2e-debug
;;
create | create-dev)
if [[ "${HOSTED_MODE}" == "true" ]]; then
make kind-deploy-registration-operator-managed-hosted
else
make kind-deploy-registration-operator-managed
fi
delete)
make kind-delete-cluster
;;
debug)
make e2e-debug
;;
create | create-dev)
if [[ "${HOSTED_MODE}" == "true" ]]; then
make kind-deploy-registration-operator-managed-hosted
else
make kind-deploy-registration-operator-managed
fi

# Approval takes place on the hub
KIND_KUBECONFIG="${PWD}/kubeconfig_${CLUSTER_PREFIX}1_e2e" make kind-approve-cluster
;;
deploy-addons)
# ManagedClusterAddon is applied to the hub
KIND_KUBECONFIG="${PWD}/kubeconfig_${CLUSTER_PREFIX}1_e2e" make kind-deploy-addons
;;
# Approval takes place on the hub
KIND_KUBECONFIG="${PWD}/kubeconfig_${CLUSTER_PREFIX}1_e2e" make kind-approve-cluster
;;
deploy-addons)
# ManagedClusterAddon is applied to the hub
KIND_KUBECONFIG="${PWD}/kubeconfig_${CLUSTER_PREFIX}1_e2e" make kind-deploy-addons
;;
esac
done

0 comments on commit 80a1d42

Please sign in to comment.