Fix 'linkerd dg proxy-metrics'

This commit is contained in:
Alejandro Pedraza 2024-04-16 10:54:04 -05:00
parent f8f73c47c7
commit 7359f371dc
No known key found for this signature in database
1 changed files with 2 additions and 1 deletions

View File

@ -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)