mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
27 lines
729 B
Bash
Executable File
27 lines
729 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
CLUSTER_NAME="${CLUSTER_NAME:-overleaf}"
|
|
|
|
export KIND_EXPERIMENTAL_PROVIDER=podman
|
|
|
|
echo "==> Creating kind cluster '${CLUSTER_NAME}'..."
|
|
|
|
if kind get clusters 2>/dev/null | grep -q "^${CLUSTER_NAME}$"; then
|
|
echo " Cluster '${CLUSTER_NAME}' already exists, skipping."
|
|
else
|
|
KIND_EXPERIMENTAL_PROVIDER=podman kind create cluster \
|
|
--name "${CLUSTER_NAME}" \
|
|
--config "${SCRIPT_DIR}/../kind/cluster.yaml" \
|
|
--wait 120s
|
|
echo " [ok] Cluster created."
|
|
fi
|
|
|
|
echo ""
|
|
echo "==> Setting kubectl context..."
|
|
kubectl cluster-info --context "kind-${CLUSTER_NAME}"
|
|
|
|
echo ""
|
|
echo "Cluster ready. Next: run 03-local-registry.sh"
|