mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #4407 from brendandburns/flaky
Return logs for failed and succeeded pods too.
This commit is contained in:
commit
c2140228fc
@ -1423,8 +1423,11 @@ func (kl *Kubelet) GetKubeletContainerLogs(podFullName, containerName, tail stri
|
||||
return fmt.Errorf("failed to get status for pod %q - %v", podFullName, err)
|
||||
}
|
||||
}
|
||||
if podStatus.Phase != api.PodRunning {
|
||||
return fmt.Errorf("pod %q is not in 'Running' state - State: %q", podFullName, podStatus.Phase)
|
||||
switch podStatus.Phase {
|
||||
case api.PodRunning, api.PodSucceeded, api.PodFailed:
|
||||
break
|
||||
default:
|
||||
return fmt.Errorf("pod %q is not in 'Running', 'Succeeded' or 'Failed' state - State: %q", podFullName, podStatus.Phase)
|
||||
}
|
||||
exists := false
|
||||
dockerContainerID := ""
|
||||
|
Loading…
Reference in New Issue
Block a user