Add init container loading to the kubelet

This commit is contained in:
Clayton Coleman
2016-03-28 23:08:54 -04:00
parent 6cc6d29339
commit 205a8b4574
12 changed files with 975 additions and 88 deletions

View File

@@ -465,6 +465,13 @@ func (s *Server) getContainerLogs(request *restful.Request, response *restful.Re
containerExists = true
}
}
if !containerExists {
for _, container := range pod.Spec.InitContainers {
if container.Name == containerName {
containerExists = true
}
}
}
if !containerExists {
response.WriteError(http.StatusNotFound, fmt.Errorf("container %q not found in pod %q\n", containerName, podID))
return