kuryr-kubernetes/kuryr_kubernetes/cni/daemon
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
..
__init__.py CNI split - introducing CNI daemon 2017-11-21 08:50:04 +01:00
service.py CNI: Watch for deleted pods 2022-03-08 12:28:48 +01:00
watcher_service.py CNI: Watch for deleted pods 2022-03-08 12:28:48 +01:00