mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Make kubelet ReadLogs
backward compatible.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
parent
c929ec153a
commit
4bb16659ee
@ -736,10 +736,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)
|
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())
|
return fmt.Errorf("Unable to retrieve container logs for %v", containerID.String())
|
||||||
}
|
}
|
||||||
labeledInfo := getContainerInfoFromLabels(status.Labels)
|
return m.ReadLogs(status.GetLogPath(), containerID.ID, logOptions, stdout, stderr)
|
||||||
annotatedInfo := getContainerInfoFromAnnotations(status.Annotations)
|
|
||||||
path := buildFullContainerLogsPath(pod.UID, labeledInfo.ContainerName, annotatedInfo.RestartCount)
|
|
||||||
return m.ReadLogs(path, containerID.ID, logOptions, stdout, stderr)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetExec gets the endpoint the runtime will serve the exec request from.
|
// GetExec gets the endpoint the runtime will serve the exec request from.
|
||||||
|
Loading…
Reference in New Issue
Block a user