mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
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 ```
This commit is contained in:
commit
7dd815221c
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user