infrastructure/justfile

32 lines
1.4 KiB
Makefile
Raw Normal View History

2024-07-21 10:27:40 +00:00
# Always use devbox environment to run commands.
set shell := ["devbox", "run"]
# Load dotenv
set dotenv-load
2024-07-25 15:42:08 +00:00
lint:
@tofu fmt -check -recursive .
@tflint --recursive
2024-07-21 10:27:40 +00:00
GATEWAY_API_VERSION := "v1.1.0"
2024-07-26 21:40:38 +00:00
PROMETHEUS_CRDS_VERSION := "main"
2024-07-21 10:27:40 +00:00
modules-cluster-manifests:
@rm -rf modules/cluster/manifests
@mkdir -p modules/cluster/manifests
@curl -L -o modules/cluster/manifests/gateway-api.crds.yaml \
"https://github.com/kubernetes-sigs/gateway-api/releases/download/{{GATEWAY_API_VERSION}}/experimental-install.yaml"
2024-07-26 21:40:38 +00:00
module-cluster-core-manifests:
@rm -rf modules/cluster-core/manifests
@mkdir -p modules/cluster-core/manifests
@curl -L -o modules/cluster-core/manifests/crd-podmonitors.yaml \
"https://raw.githubusercontent.com/prometheus-community/helm-charts/{{PROMETHEUS_CRDS_VERSION}}/charts/kube-prometheus-stack/charts/crds/crds/crd-podmonitors.yaml"
@curl -L -o modules/cluster-core/manifests/crd-servicemonitors.yaml \
"https://raw.githubusercontent.com/prometheus-community/helm-charts/{{PROMETHEUS_CRDS_VERSION}}/charts/kube-prometheus-stack/charts/crds/crds/crd-servicemonitors.yaml"
k8s-apply: modules-cluster-manifests module-cluster-core-manifests
2024-07-21 10:27:40 +00:00
tofu -chdir={{justfile_directory()}}/k8s.tjo.cloud init
tofu -chdir={{justfile_directory()}}/k8s.tjo.cloud apply -target module.cluster
2024-07-23 18:42:22 +00:00
tofu -chdir={{justfile_directory()}}/k8s.tjo.cloud apply -target module.cluster-core
2024-07-21 10:27:40 +00:00
tofu -chdir={{justfile_directory()}}/k8s.tjo.cloud apply