From f59d072ef14bcf5390a925d1a57a16ce2963f581 Mon Sep 17 00:00:00 2001 From: Timofei Larkin Date: Thu, 4 Sep 2025 11:03:05 +0300 Subject: [PATCH] [ci] Fix garbage output in cozyreport Some "while read NAMESPACE NAME _" steps in the cozyreport script that collects debug info weren't omitting the headers in `kubectl get` output and trying to get objects named NAME in namespace NAMESPACE. This patch adds `--no-header` to some places where it was forgotten. ```release-note [ci] Fix an error in cozyreport that tried to parse non-existent objects and generated garbage output in CI debug logs ``` Signed-off-by: Timofei Larkin --- hack/cozyreport.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/cozyreport.sh b/hack/cozyreport.sh index 3d3e22cf..3174ed50 100755 --- a/hack/cozyreport.sh +++ b/hack/cozyreport.sh @@ -48,7 +48,7 @@ kubectl get ns --no-headers | awk '$2 != "Active"' | echo "Collecting helmreleases..." kubectl get hr -A > $REPORT_DIR/kubernetes/helmreleases.txt 2>&1 -kubectl get hr -A | awk '$4 != "True"' | \ +kubectl get hr -A --no-headers | awk '$4 != "True"' | \ while read NAMESPACE NAME _; do DIR=$REPORT_DIR/kubernetes/helmreleases/$NAMESPACE/$NAME mkdir -p $DIR @@ -105,7 +105,7 @@ kubectl get svc -A --no-headers | awk '$4 == ""' | echo "Collecting pvcs..." kubectl get pvc -A > $REPORT_DIR/kubernetes/pvcs.txt 2>&1 -kubectl get pvc -A | awk '$3 != "Bound"' | +kubectl get pvc -A --no-headers | awk '$3 != "Bound"' | while read NAMESPACE NAME _; do DIR=$REPORT_DIR/kubernetes/pvc/$NAMESPACE/$NAME mkdir -p $DIR