Kubelet server was not returning a 500 on errors writing logs
Writing 200 first masks the second error. 200 is defaulted by the Go http stack automatically.
This commit is contained in:
parent
4f559b3af7
commit
8448b60f51
@ -440,7 +440,6 @@ func (s *Server) getContainerLogs(request *restful.Request, response *restful.Re
|
||||
fw = limitwriter.New(fw, *logOptions.LimitBytes)
|
||||
}
|
||||
response.Header().Set("Transfer-Encoding", "chunked")
|
||||
response.WriteHeader(http.StatusOK)
|
||||
if err := s.host.GetKubeletContainerLogs(kubecontainer.GetPodFullName(pod), containerName, logOptions, fw, fw); err != nil {
|
||||
if err != limitwriter.ErrMaximumWrite {
|
||||
response.WriteError(http.StatusInternalServerError, err)
|
||||
|
Loading…
Reference in New Issue
Block a user