Skip to content

Commit

Permalink
Fix 'linkerd dg proxy-metrics'
Browse files Browse the repository at this point in the history
  • Loading branch information
alpeb committed Apr 23, 2024
1 parent f8f73c4 commit 7359f37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/cmd/metrics_diagnostics_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ func getAllContainersWithPort(
}
var containers []corev1.Container

for _, c := range pod.Spec.Containers {
allContainers := append(pod.Spec.InitContainers, pod.Spec.Containers...)
for _, c := range allContainers {
for _, p := range c.Ports {
if p.Name == portName {
containers = append(containers, c)
Expand Down

0 comments on commit 7359f37

Please sign in to comment.