Skip to content

Commit c7ea510

Browse files
committed
add flux namespace to diagnostics
1 parent 03a4645 commit c7ea510

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

script/diagnose-e2e-failure.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,48 @@ section "Services & Endpoints"
7474
section "Network Policies"
7575
kubectl get networkpolicy -n "${NS}" || true
7676

77+
section "Flux System Namespace (flux-system)"
78+
if kubectl get namespace flux-system >/dev/null 2>&1; then
79+
echo "Flux namespace found - gathering diagnostics..."
80+
echo
81+
echo "--- Flux Deployments ---"
82+
kubectl get deploy -n flux-system -o wide || true
83+
echo
84+
echo "--- Flux Pods ---"
85+
kubectl get pods -n flux-system -o wide || true
86+
echo
87+
echo "--- Flux HelmRepositories ---"
88+
kubectl get helmrepositories.source.toolkit.fluxcd.io -A || true
89+
echo
90+
echo "--- Flux HelmCharts ---"
91+
kubectl get helmcharts.source.toolkit.fluxcd.io -A || true
92+
echo
93+
echo "--- Flux HelmReleases ---"
94+
kubectl get helmreleases.helm.toolkit.fluxcd.io -A || true
95+
echo
96+
echo "--- Source Controller Logs (tail 200) ---"
97+
for p in $(kubectl get pods -n flux-system -l app=source-controller -o name 2>/dev/null); do
98+
echo "Logs for $p:"
99+
kubectl logs -n flux-system "$p" --tail=200 || true
100+
echo
101+
done
102+
echo
103+
echo "--- Helm Controller Logs (tail 200) ---"
104+
for p in $(kubectl get pods -n flux-system -l app=helm-controller -o name 2>/dev/null); do
105+
echo "Logs for $p:"
106+
kubectl logs -n flux-system "$p" --tail=200 || true
107+
echo
108+
done
109+
echo
110+
echo "--- Flux Network Policies ---"
111+
kubectl get networkpolicy -n flux-system || true
112+
echo
113+
echo "--- Flux Events (last 100) ---"
114+
kubectl get events -n flux-system --sort-by=.lastTimestamp 2>/dev/null | tail -n 100 || true
115+
else
116+
warn "flux-system namespace not found - Flux may not be installed"
117+
fi
118+
77119
section "PVC/PV"
78120
kubectl get pvc -n "${NS}" || true
79121
kubectl get pv | grep "${RELEASE}" || true

0 commit comments

Comments
 (0)