dumpnet-argo/scripts/post-apply.sh

26 lines
744 B
Bash
Executable file

#!/bin/sh
# Post-apply bootstrap script
# Run this once after 'make apply' completes on a fresh cluster
set -e
echo "==> Fetching kubeconfig..."
make kubeconfig
echo "==> Fetching talosconfig..."
make talosconfig
echo "==> Waiting for cluster to be ready..."
kubectl wait --for=condition=Ready node --all --timeout=120s
echo "==> Importing ingress-nginx namespace into Terraform state (if needed)..."
cd terraform
terraform import kubernetes_namespace.ingress_nginx ingress-nginx 2>/dev/null || echo "Already in state, skipping"
cd ..
echo "==> Bootstrapping ArgoCD App of Apps..."
make bootstrap
echo ""
echo "Done! ArgoCD should be available at https://argocd.dumpnet.chat shortly."
echo "Get your password with: make argocd-password"