mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 18:58:18 +00:00
break from the for loop
This commit is contained in:
@@ -479,12 +479,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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user