File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/integration-tests/bash Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -109,11 +109,17 @@ function genericDelete {
109109 resfile_yes=" $TMP_DIR /kinv_filtered_yesnamespace.out.tmp"
110110
111111 # leftover namespaced artifacts
112- kubectl get $1 --show-labels=true --all-namespaces=true 2>&1 | egrep -e " ($3 )" | awk ' { print $1 " " $2 }' | sort > $resfile_yes 2>&1
112+ kubectl get $1 \
113+ -o=jsonpath=' {range .items[*]}{.metadata.namespace}{" "}{.kind}{"/"}{.metadata.name}{"\n"}{end}' \
114+ --all-namespaces=true 2>&1 \
115+ | egrep -e " ($3 )" | sort > $resfile_yes 2>&1
113116 artcount_yes=" ` cat $resfile_yes | wc -l` "
114117
115118 # leftover non-namespaced artifacts
116- kubectl get $2 --show-labels=true --all-namespaces=true 2>&1 | egrep -e " ($3 )" | awk ' { print $1 }' | sort > $resfile_no 2>&1
119+ kubectl get $2 \
120+ -o=jsonpath=' {range .items[*]}{.kind}{"/"}{.metadata.name}{"\n"}{end}' \
121+ --all-namespaces=true 2>&1 \
122+ | egrep -e " ($3 )" | sort > $resfile_no 2>&1
117123 artcount_no=" ` cat $resfile_no | wc -l` "
118124
119125 artcount_total=$(( artcount_yes + artcount_no))
You can’t perform that action at this time.
0 commit comments