Skip to content

Commit

Permalink
support native sidecar for bug-report (istio#47702)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiaop authored Nov 2, 2023
1 parent 886a06c commit 7999247
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tools/bug-report/pkg/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,20 @@ func GetClusterResources(ctx context.Context, clientset *kubernetes.Clientset, c
for _, c := range p.Spec.Containers {
out.insertContainer(p.Namespace, deployment, p.Name, c.Name)
}
for _, c := range p.Spec.InitContainers {
if c.Name == inject.ProxyContainerName {
out.insertContainer(p.Namespace, deployment, p.Name, c.Name)
}
}
} else if daemonset != "" {
for _, c := range p.Spec.Containers {
out.insertContainer(p.Namespace, daemonset, p.Name, c.Name)
}
for _, c := range p.Spec.InitContainers {
if c.Name == inject.ProxyContainerName {
out.insertContainer(p.Namespace, deployment, p.Name, c.Name)
}
}
}

out.Labels[PodKey(p.Namespace, p.Name)] = p.Labels
Expand Down

0 comments on commit 7999247

Please sign in to comment.