62 lines
1.8 KiB
Makefile
62 lines
1.8 KiB
Makefile
ifeq ($(ENV),)
|
|
$(error ENV variable is not defined. Please set it to one of development|staging|production)
|
|
endif
|
|
|
|
.PHONY: flux
|
|
|
|
namespaces:
|
|
./scripts/k8s-namespaces.sh
|
|
|
|
secrets:
|
|
dotenvx run -f .env.${ENV} -- ./scripts/k8s-secrets.sh
|
|
|
|
flux:
|
|
./scripts/flux-bootstrap.sh
|
|
|
|
cluster: echoenv kind namespaces gateway secrets velero flux metrics chisel
|
|
|
|
gateway:
|
|
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.0/standard-install.yaml
|
|
|
|
metrics:
|
|
./scripts/k8s-metrics.sh
|
|
|
|
echoenv:
|
|
echo "[echoenv] Using ${ENV} environment. If this is not what you want, export ENV=development|staging|production"
|
|
|
|
scrap: namespaces secrets velero flux
|
|
|
|
velero:
|
|
./scripts/velero-create.sh
|
|
|
|
tilt:
|
|
kind get kubeconfig > ~/.kube/futureporn.yaml
|
|
KUBECONFIG=~/.kube/futureporn.yaml tilt up -f ./Tiltfile
|
|
|
|
cert-manager:
|
|
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.15.1/cert-manager.yaml
|
|
|
|
exoscale:
|
|
kubectl apply -f https://raw.githubusercontent.com/exoscale/cert-manager-webhook-exoscale/master/deploy/exoscale-webhook-kustomize/deploy.yaml
|
|
|
|
kind:
|
|
./scripts/kind-with-local-registry.sh
|
|
|
|
kindload:
|
|
./scripts/kind-load.sh
|
|
|
|
clean:
|
|
kind delete cluster
|
|
dotenvx run -f .env.${ENV} -- node ./packages/infra/vultr-delete-orphaned-resources.js
|
|
|
|
deps:
|
|
echo "use `devbox install`"
|
|
|
|
# A gitea act runner which runs locally
|
|
# https://docs.gitea.com/next/usage/actions/overview
|
|
# this doesnt work because of missing docker in docker
|
|
# I'm running this using systemd instead
|
|
#runner:
|
|
# docker run -d --rm -e GITEA_INSTANCE_URL=https://gitea.futureporn.net -e GITEA_RUNNER_REGISTRATION_TOKEN=${GITEA_RUNNER_REGISTRATION_TOKEN} -v /var/run/docker.sock:/var/run/docker.sock -v $$HOME/.local/share/applications/fp/act-runner-data:/data --privileged --name fp-gitea-act-runner gitea/act_runner
|
|
|