Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/bug-report: Reduce k8s API calls via "get" not "describe" #47918

Merged
merged 3 commits into from
Nov 20, 2023

Conversation

tonya11en
Copy link
Contributor

@tonya11en tonya11en commented Nov 17, 2023

The istioctl bug-report will use the get pods and get nodes commands for the report instead of describe .... This reduces the amount of calls made to the k8s API and speeds up the generation of the bug report tool.

Signed-off-by: Tony Allen <tony@allen.gg>
Signed-off-by: Tony Allen <tony@allen.gg>
@tonya11en tonya11en requested a review from a team as a code owner November 17, 2023 22:25
@istio-testing istio-testing added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 17, 2023
// GetDescribePods returns describe pods for istioNamespace.
func GetDescribePods(p *Params) (map[string]string, error) {
// GetPodInfo returns pod details for istioNamespace.
func GetPodInfo(p *Params) (map[string]string, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think GetK8sResources already includes pods. We can add nodes there as well?

Confusingly, all doesn't mean all. It includes pods, but not nodes.

@howardjohn howardjohn added the do-not-merge/hold Block automatic merging of a PR. label Nov 17, 2023
Copy link
Member

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I put a hold if you have a chance to address the other comment.

Thanks!

Signed-off-by: Tony Allen <tony@allen.gg>
@tonya11en tonya11en removed the do-not-merge/hold Block automatic merging of a PR. label Nov 20, 2023
@istio-testing istio-testing merged commit 7033e70 into istio:master Nov 20, 2023
28 checks passed
@tonya11en tonya11en deleted the tallen/get-not-describe branch November 21, 2023 18:18
@syw14 syw14 added the cherrypick/release-1.20 Set this label on a PR to auto-merge it to the release-1.20 branch label Dec 7, 2023
@istio-testing
Copy link
Collaborator

In response to a cherrypick label: new pull request created: #48216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/perf and scalability cherrypick/release-1.20 Set this label on a PR to auto-merge it to the release-1.20 branch size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants