-
Notifications
You must be signed in to change notification settings - Fork 6
/
justfile
25 lines (22 loc) · 615 Bytes
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
_default:
just --list --unsorted
# name for the local cluster
cluster := "kube-leader-election"
# start a local kubernetes cluster, if not running
start-test-cluster:
#!/usr/bin/env bash
set -euo pipefail
if ! k3d cluster list | grep -qF "{{cluster}}"; then
k3d cluster create "{{cluster}}" --k3s-arg="--disable=traefik@server:0"
else
echo "Cluster already running"
fi
# clean the local cluster
stop-test-cluster:
#!/usr/bin/env bash
set -euo pipefail
if k3d cluster list | grep -qF "{{cluster}}"; then
k3d cluster delete "{{cluster}}"
else
echo "Cluster already pruned"
fi