Files
kubernetes/deploy.sh
2023-10-19 15:53:26 -04:00

15 lines
631 B
Bash

#!/bin/sh
for namespace in namespaces/*; do
if [ "$DRY_RUN" = true ]; then
printf "\033[1;33m*******************************************************\n"
printf "Dry running changes to %s\n" "$(basename "$namespace")"
printf "*******************************************************\033[0m\n"
kubectl apply -f "$namespace" --dry-run=server
else
printf "\033[1;33m*******************************************************\n"
printf "Deploying changes to %s\n" "$(basename "$namespace")"
printf "*******************************************************\033[0m\n"
kubectl apply -f "$namespace"
fi
done