kuryr-kubernetes/kuryr_kubernetes/tests/unit/cni
Michał Dulko 0176b4a98c CNI: Watch for deleted pods
It can happen that we get the CNI request, but pod gets deleted before
kuryr-controller was able to create KuryrPort for it. If kuryr-daemon
only watches for KuryrPort events it will not be able to notice that
and will wait until the timeout, which in effect doesn't play well with
some K8s tests.

This commit adds a separate Service that will watch on Pod events and if
Pod gets deleted we'll make sure to put a sentinel value (None) into the
registry so that the thread waiting for the KuryrPort to appear there
will know that it has to stop and raise an error.

Closes-Bug: 1963678
Change-Id: I52fc1805ec47f24c1da88fd13e79e928a3693419
2022-03-08 12:28:48 +01:00
..
plugins CNI: Watch for deleted pods 2022-03-08 12:28:48 +01:00
__init__.py Prevent pyroute2.IPDB threads leaking 2017-11-17 12:30:54 +01:00
test_api.py Use unittest.mock instead of third party mock 2020-04-18 11:53:51 -05:00
test_binding.py Refactor sriov binding driver 2020-07-23 09:48:22 +03:00
test_handlers.py CNI: Watch for deleted pods 2022-03-08 12:28:48 +01:00
test_health.py Use unittest.mock instead of third party mock 2020-04-18 11:53:51 -05:00
test_main.py Use unittest.mock instead of third party mock 2020-04-18 11:53:51 -05:00
test_service.py CNI: Watch for deleted pods 2022-03-08 12:28:48 +01:00
test_utils.py cni health: track all cgroup memory usage 2018-03-06 22:24:58 +01:00