Unverified Commit c838d0ac authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #66096 from feiskyer/automated-cherry-pick-of-#63268-upstream-release-1.10

Automatic merge from submit-queue. Automated cherry pick of #63268: Make kubelet `ReadLogs` backward compatible. Cherry pick of #63268 on release-1.10. #63268: Make kubelet `ReadLogs` backward compatible. ```release-note Make kubelet ReadLogs backward compatible. ```
parents f7f48f22 d0d75ce6
......@@ -730,10 +730,7 @@ func (m *kubeGenericRuntimeManager) GetContainerLogs(pod *v1.Pod, containerID ku
glog.V(4).Infof("failed to get container status for %v: %v", containerID.String(), err)
return fmt.Errorf("Unable to retrieve container logs for %v", containerID.String())
}
labeledInfo := getContainerInfoFromLabels(status.Labels)
annotatedInfo := getContainerInfoFromAnnotations(status.Annotations)
path := buildFullContainerLogsPath(pod.UID, labeledInfo.ContainerName, annotatedInfo.RestartCount)
return m.ReadLogs(path, containerID.ID, logOptions, stdout, stderr)
return m.ReadLogs(status.GetLogPath(), containerID.ID, logOptions, stdout, stderr)
}
// GetExec gets the endpoint the runtime will serve the exec request from.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment