ADD: Check for k8s image before start

This commit is contained in:
Nishan
2025-04-07 21:43:07 +05:30
parent 005e7826af
commit 96a3726871
5 changed files with 9 additions and 6 deletions

View File

@@ -110,7 +110,7 @@
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#" id="toggleViewBtn">Switch to Terminal</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="https://github.com/nishanb/CKAD-X">Help</a></li>
<li><a class="dropdown-item" href="https://github.com/nishanb/CK-X">Help</a></li>
</ul>
</div>
<div class="dropdown d-inline-block">

View File

@@ -177,8 +177,6 @@ services:
command: ["redis-server", "--appendonly", "yes"]
expose:
- "6379"
volumes:
- redis-data:/data
restart: unless-stopped
networks:
- ckx-network
@@ -241,5 +239,4 @@ networks:
driver: bridge
volumes:
kube-config: # Shared volume for Kubernetes configuration
redis-data: # Persistent volume for Redis data
kube-config: # Shared volume for Kubernetes configuration

View File

@@ -60,7 +60,7 @@ The `index.html` file serves as the main landing page for the CK-X Simulator. He
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/nishanb/CKAD-X" target="_blank">
<a class="nav-link" href="https://github.com/nishanb/CK-X" target="_blank">
<!-- GitHub Icon -->
GitHub
</a>

View File

@@ -36,6 +36,7 @@ adduser -S -D -H -s /sbin/nologin -G sshd sshd
#start ssh service
/usr/sbin/sshd -D &
sleep 10
touch /ready
# Keep container running

View File

@@ -9,6 +9,11 @@ NUM_WORKERS=${1:-0} # Default to 1 worker if not provided
CLUSTER_NAME=${2:-cluster}
NODE_IMAGE=${3:-kindest/node:v1.32.3}
#cleanup env
echo "Cleaning up environment..."
env-cleanup
sleep 10
#delete kind-config.yaml if present
if [ -f "kind-config.yaml" ]; then
echo "kind-config.yaml already exists, deleting it"