-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
50 lines (38 loc) · 1.51 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
set shell := ["bash", "-uc"]
[group('talos')]
gen-secrets:
talosctl gen secrets
[group('talos')]
gen-config machine-patch cluster-name="home_cgn" cluster-endpoint="https://${CLUSTER_STATIC_IP_V4}:6443":
-talosctl gen config {{cluster-name}} {{cluster-endpoint}} --output-types talosconfig --with-secrets secrets.yaml
talosctl gen config {{cluster-name}} {{cluster-endpoint}} --with-docs=false --with-examples=false --output-types controlplane --force --config-patch {{machine-patch}} --with-secrets secrets.yaml --config-patch @talos/patches/dns.yaml
talosctl validate -c controlplane.yaml -m metal
[group('talos')]
apply-config ip insecure="false":
talosctl apply-config -n {{ip}} -e {{ip}} {{ if insecure == "insecure" { "--insecure" } else {""} }} -f controlplane.yaml
[group('talos')]
update-config ip:
talosctl --talosconfig ./talosconfig config endpoints "{{ip}}"
talosctl --talosconfig ./talosconfig config nodes "{{ip}}"
[group('talos')]
bootstrap ip:
talosctl bootstrap -n {{ip}} -e {{ip}}
[group('talos')]
kubeconfig:
talosctl kubeconfig ./kubeconfig
terraform-folder := "./deploy"
[group('ci-cd')]
deploy:
terraform -chdir={{terraform-folder}} apply
[group('ci-cd')]
init:
terraform -chdir={{terraform-folder}} init
[group('ci-cd')]
plan:
terraform -chdir={{terraform-folder}} plan
[group('ci-cd')]
tf-upgrade:
terraform -chdir={{terraform-folder}} init -upgrade
[group('1password')]
op-service-account:
op service-account create "home_cgn_cluster" --vault $TF_VAR_onepassword_vault_id:read_items