mirror of https://github.com/k3s-io/k3s
Return logs for failed and succeeded pods too.
parent
4d141025da
commit
8b7dfc9359
|
@ -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)
|
return fmt.Errorf("failed to get status for pod %q - %v", podFullName, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if podStatus.Phase != api.PodRunning {
|
switch podStatus.Phase {
|
||||||
return fmt.Errorf("pod %q is not in 'Running' state - State: %q", podFullName, 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
|
exists := false
|
||||||
dockerContainerID := ""
|
dockerContainerID := ""
|
||||||
|
|
Loading…
Reference in New Issue