mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
Kubelet: only check podUID when it is actually set
This commit is contained in:
parent
6a1d0f0b7b
commit
1140d31d9b
@ -1357,7 +1357,7 @@ func (kl *Kubelet) GetAttach(podFullName string, podUID types.UID, containerName
|
||||
// since whether the process is running in a TTY cannot be changed after it has started. We
|
||||
// need the api.Pod to get the TTY status.
|
||||
pod, found := kl.GetPodByFullName(podFullName)
|
||||
if !found || pod.UID != podUID {
|
||||
if !found || (string(podUID) != "" && pod.UID != podUID) {
|
||||
return nil, fmt.Errorf("pod %s not found", podFullName)
|
||||
}
|
||||
containerSpec := kubecontainer.GetContainerSpec(pod, containerName)
|
||||
|
Loading…
Reference in New Issue
Block a user