r6 phase1 dns/tcp sweep script

This commit is contained in:
2026-11-27 20:54:56 +00:00
parent dc2ad80046
commit 397340dfa4
+57
View File
@@ -0,0 +1,57 @@
#!/bin/sh
# R6 phase 1: in-cluster DNS + TCP sweep (object storage / argocd / registry / bonus)
echo "R6-P1-START $(date -u)"
echo "R6-RESOLV $(cat /etc/resolv.conf | tr '\n' ';')"
echo "R6-HOSTS $(cat /etc/hosts | tr '\n' ';')"
sweep() {
h=$1; shift
for p in "$@"; do
code=$(curl -s -o /dev/null -m 4 -w '%{http_code}' "http://$h:$p/" 2>/dev/null)
rc=$?
if [ "$rc" != "6" ]; then
echo "R6-TCP $h:$p rc=$rc code=$code"
if [ "$code" != "000" ]; then
echo "R6-BODY $h:$p $(curl -s -m 5 "http://$h:$p/" 2>/dev/null | head -c 300 | tr '\n' ' ')"
fi
fi
done
}
echo "R6-SECTION storage-candidates"
for h in minio.minio.svc.cluster.local minio.minio.svc minio.default.svc.cluster.local \
minio.storage.svc.cluster.local minio.storage.svc storage.storage.svc.cluster.local \
object-storage.storage.svc.cluster.local s3.storage.svc.cluster.local s3.s3.svc.cluster.local \
minio.cf-lcj11.svc.cluster.local minio.minio-tenant.svc.cluster.local \
minio.minio-tenant.svc.minio-tenant.cluster.local \
seaweedfs.seaweedfs.svc.cluster.local seaweedfs-master.seaweedfs.svc.cluster.local \
rook-ceph-rgw-my-store.rook-ceph.svc.cluster.local; do
sweep "$h" 9000 9001 80 443
done
echo "R6-SECTION argocd-candidates"
for h in argocd-server.argocd.svc.cluster.local argocd-server.argocd.svc \
argocd-server.cf-lcj11.svc.cluster.local argocd-server.platform.svc.cluster.local \
argocd-server.platform-system.svc.cluster.local argocd-server.cicd.svc.cluster.local \
argocd-server.gitops.svc.cluster.local argocd-server.argocd-system.svc.cluster.local \
argocd.argocd.svc.cluster.local argocd-argocd-server.argocd.svc.cluster.local \
argo-cd-argocd-server.argocd.svc.cluster.local argocd-application-controller.argocd.svc.cluster.local \
argocd-server.sysait.svc.cluster.local argocd-server.cf.svc.cluster.local; do
sweep "$h" 80 443
done
echo "R6-SECTION registry-candidates"
for h in registry.registry.svc.cluster.local registry.default.svc.cluster.local \
registry.registry.svc registry.cf-lcj11.svc.cluster.local harbor.harbor.svc.cluster.local \
docker-registry.docker-registry.svc.cluster.local registry.platform.svc.cluster.local \
registry.sysait.svc.cluster.local; do
sweep "$h" 5000 80 443
done
echo "R6-SECTION bonus-monitoring-and-tenant-apps"
sweep grafana.monitoring.svc.cluster.local 80 443 3000
for h in cottoncraft-demo-prod.svc.cluster.local cottoncraft-demo-dev.svc.cluster.local \
manufaktura-oprogramowani-30f8-dev.svc.cluster.local cfbusiness-2a4c-dev.svc.cluster.local; do
sweep "$h" 80 443 8080
done
echo "R6-P1-END"