36 lines
942 B
Makefile
36 lines
942 B
Makefile
|
alias ap := apply
|
||
|
alias bh := build-helm
|
||
|
alias ah := apply-helm
|
||
|
|
||
|
alias ds := deploy-site
|
||
|
|
||
|
build app="":
|
||
|
kustomize build kubernetes/{{app}} --enable-helm > result.yaml
|
||
|
|
||
|
apply app="": (build app)
|
||
|
kubectl apply -f result.yaml
|
||
|
|
||
|
build-helm name chart values:
|
||
|
helm template {{name}} {{chart}} -f {{values}} --namespace {{name}} --dry-run=server --kube-version=1.30 > result.yaml
|
||
|
|
||
|
apply-helm name chart values: (build-helm name chart values)
|
||
|
kubectl apply -f result.yaml -n {{name}}
|
||
|
|
||
|
deploy-site branch="main":
|
||
|
npx wrangler pages deploy gmem.ca/ --branch {{branch}}
|
||
|
|
||
|
age-identity:
|
||
|
age-plugin-yubikey --identity > /tmp/age-identity
|
||
|
|
||
|
encrypt-talos:
|
||
|
for file in `ls talos/*.yaml`; do \
|
||
|
echo "encrypting ${file}"; \
|
||
|
age -e -R gmem.ca/age -o "${file}.age" "${file}"; \
|
||
|
done
|
||
|
|
||
|
decrypt-talos: age-identity
|
||
|
for file in `ls talos/*.age`; do \
|
||
|
echo "decrypting ${file}"; \
|
||
|
age -d -i /tmp/age-identity -o "${file/.age/}" "${file}"; \
|
||
|
done
|