#!/bin/bash # Dry-run validate every app manifest in apps/default/ against live cluster export KUBECONFIG="C:\\Users\\ivanch\\.kube\\config" cd "C:/Users/ivanch/Desktop/gitops-draft" || exit 1 fail=0 for f in apps/default/*.yaml; do out=$(kubectl.exe apply --dry-run=server -f "$f" 2>&1) if echo "$out" | grep -qi "error"; then echo "FAIL: $f" echo "$out" | grep -i error | head -2 fail=1 else echo "OK: $f" fi done [ $fail -eq 0 ] && echo "ALL apps/default dry-runs clean" exit $fail