Copy dnsmasq NixNG image creation to here

Create GC roots for k8s manifests
This commit is contained in:
Pim Kunis 2024-09-24 23:00:55 +02:00
parent cf8d278219
commit 1ee319f179
7 changed files with 222 additions and 22 deletions

View file

@ -1,7 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
echo Uploading closure...
for server in $SERVERS; do
echo Uploading closure to $server...
nix copy --to "ssh://root@$server.dmz" $MANIFEST
ssh "root@$server.dmz" "mkdir -p $GCROOTDIR && ln -sf $MANIFEST $GCROOTDIR/${NAME}.yml"
done
echo Applying Kubernetes manifest...
export KUBECTL_APPLYSET=true
vals eval -fail-on-missing-key-in-map <$MANIFEST | kubectl apply -f - --prune --applyset $APPLYSET --namespace $NAMESPACE
vals eval -fail-on-missing-key-in-map <$MANIFEST | \
kubectl apply -f - \
--prune \
--applyset applyset-$NAME \
--namespace $NAMESPACE