Commit 7dd81522 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #39838 from foxyriver/add-break

Automatic merge from submit-queue break from the for loop **What this PR does / why we need it**: exit loop, because the following actions will not affect the result **Special notes for your reviewer**: **Release note**: ```release-note ```
parents e9165d3d b35dc8ec
......@@ -469,12 +469,14 @@ func (s *Server) getContainerLogs(request *restful.Request, response *restful.Re
for _, container := range pod.Spec.Containers {
if container.Name == containerName {
containerExists = true
break
}
}
if !containerExists {
for _, container := range pod.Spec.InitContainers {
if container.Name == containerName {
containerExists = true
break
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment