From 41bc89ae3fd60dbea3fca219cf586acc729728c0 Mon Sep 17 00:00:00 2001 From: Xiaopeng Han Date: Thu, 2 Nov 2023 21:04:52 +0800 Subject: [PATCH] Fix istiod and proxy versions are incorrect in bug report (#47703) * fix istio version incorrect * add releasenotes * remove extra --- releasenotes/notes/47703.yaml | 6 ++++++ tools/bug-report/pkg/bugreport/bugreport.go | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 releasenotes/notes/47703.yaml diff --git a/releasenotes/notes/47703.yaml b/releasenotes/notes/47703.yaml new file mode 100644 index 000000000000..486599afb0a8 --- /dev/null +++ b/releasenotes/notes/47703.yaml @@ -0,0 +1,6 @@ +apiVersion: release-notes/v2 +kind: bug-fix +area: istioctl +releaseNotes: +- | + **Fixed** an issue where sometimes control plane revisions and proxy versions were not obtained in the bug report. diff --git a/tools/bug-report/pkg/bugreport/bugreport.go b/tools/bug-report/pkg/bugreport/bugreport.go index 1ea9b9e016ab..1e20ecb13a4e 100644 --- a/tools/bug-report/pkg/bugreport/bugreport.go +++ b/tools/bug-report/pkg/bugreport/bugreport.go @@ -240,6 +240,13 @@ func getIstioRevisions(resources *cluster2.Resources) []string { } } } + for _, podAnnotations := range resources.Annotations { + for annotation, value := range podAnnotations { + if annotation == label2.IoIstioRev.Name { + revMap.Insert(value) + } + } + } return sets.SortedList(revMap) }