#!/usr/bin/env bash set -euo pipefail 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-$NAME \ --namespace $NAMESPACE