-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
78 lines (59 loc) · 1.52 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# https://cheatography.com/linux-china/cheat-sheets/justfile/
set dotenv-filename := 'environ'
set dotenv-load := true
set dotenv-required := true
set export
set unstable
set script-interpreter := ['uv', 'run']
alias c := create-cluster
alias cfg := pyhk3-config
alias t := test
alias p := pyhk3
alias pf := port-forward
alias fk := flux-kubeconform
alias elk := download-kubectl
export FLUX_REPO := 'tmp/our-repo.git'
default:
@just --list
pyhk3 *ARGS:
uv run pyhk3 {{ARGS}}
do *ARGS:
just p do {{ARGS}}
ssh *ARGS:
just p do ssh {{ARGS}}
pyhk3-config *ARGS:
just p hk3s render_config
just p do show_env {{ARGS}}
env *ARGS:
just p do show_env {{ARGS}}
[confirm('Sure to destroy all servers of the cluster?')]
rm:
just p do delete all
[confirm('Sure to destroy proxy (if existing) and recreate it?')]
recover-proxy:
just p do delete proxy
just p create proxy proxylb dns
just p recover hk3sconfig
just p recover kubeconfig
create-cluster:
just p create proxy k3s proxylb dns
download-kubectl:
just p do download_kubectl
# enables a port-forward to proxy, so that kubectl, when downloaded, can be used
port-forward:
just p do port_forward
flux-install:
just p flux install
just p flux add_sops_secret
just p flux add_tmpl 'gh:/fluxcd/flux2-kustomize-helm-example'
flux-uninstall:
just p flux uninstall
flux-kubeconform:
cd "$FLUX_REPO" && scripts/validate.sh
test:
just pyhk3-config
uv run pytest ./tests/test_setup.py
publish:
just test
uv build
uv publish --token `pass show pypitoken`