Commit Graph

3 Commits

Author SHA1 Message Date
Stanislav Laznicka
7f532891c9
e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
Ed Bartosh
867be8fc3e get rid of e2e/framework -> k/k/pkg/kubelet dependency
It's conceptually wrong to have dependencies to k/k/pkg in
the e2e framework code. They should be moved to corresponding
packages, in this particular case to the test/e2e_node.
2023-04-14 00:28:33 +03:00
David Porter
039a848274 test: Add e2e node test to check for unknown pods
Unknown pods are pods which are unknown pods to the kubelet, but are still
running in the container runtime. If kubelet detects a pod which is not in
the config (i.e. not present in API-server or static pod), but running as
detected in container runtime, kubelet should aggressively terminate the pod.

This situation can be encountered if a pod is running, then kubelet is
stopped, and while stopped, the manifest is deleted (by force deleting the
API pod or deleting the static pod manifest), and then restarting the
kubelet. Upon restart, kubelet will see the pod as running via the container
runtime, but it will not be present in the config, thus making the pod a
"unknown pod". Kubelet should then proceed to terminate these unknown pods.

Add two tests that ensure that unknown pods will be terminated (1)
static pods and (2) API pods. The test will start a pod, stop the
kubelet, force delete the pod (by deleting the manifest or force
deleting the pod), and then restarting the kubelet. The container
runtime is then queried to ensure the containers are terminated by
kubelet.

Signed-off-by: David Porter <david@porter.me>
2023-02-03 23:04:45 -08:00