mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-14 22:33:34 +00:00
break from the for loop
This commit is contained in:
parent
e7537a21d9
commit
b35dc8ecd7
@ -479,12 +479,14 @@ func (s *Server) getContainerLogs(request *restful.Request, response *restful.Re
|
|||||||
for _, container := range pod.Spec.Containers {
|
for _, container := range pod.Spec.Containers {
|
||||||
if container.Name == containerName {
|
if container.Name == containerName {
|
||||||
containerExists = true
|
containerExists = true
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !containerExists {
|
if !containerExists {
|
||||||
for _, container := range pod.Spec.InitContainers {
|
for _, container := range pod.Spec.InitContainers {
|
||||||
if container.Name == containerName {
|
if container.Name == containerName {
|
||||||
containerExists = true
|
containerExists = true
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user