kuryr-kubernetes/kuryr_kubernetes
Maysa Macedo 46b1407dea Fix fail to recreate namespace when previous KuryrNet CRD is not deleted
When a namespace/project is recreated right after its deletion,
it's possible that the previous kuryrNet CRD is not yet removed,
and Kuryr will try to create another CRD, resulting in k8s conflict
exception. In the meantime, other events handling resources under
the same namespace in question could be inquiring for an annotation
on the namespace, that was not annotated due to the conflict error,
causing the controller to restart.

This commit fixes the issue by adding an annotation to the KuryrNet
CRD with the respective namespace uid, which allows to check
if the existing CRD corresponds to the namespace.

Depends-On: https://review.opendev.org/#/c/677487/
Change-Id: I85d903902b516bfd109078705860540d731886bc
Closes-Bug: 1833712
(cherry picked from commit 37b8e3e6b3)
2019-08-21 08:26:42 +00:00
..
cmd CNI split - introducing CNI daemon 2017-11-21 08:50:04 +01:00
cni Lowercase hostname when using it as K8s nodeName 2018-12-03 14:19:56 +00:00
controller Fix fail to recreate namespace when previous KuryrNet CRD is not deleted 2019-08-21 08:26:42 +00:00
handlers Merge "Log the exception-info when an error raises in hanlder" 2018-05-16 10:13:14 +00:00
objects Change Pod annotations format to o.vo 2018-08-01 15:30:42 +02:00
platform OCP-Router: Fix path route to support subpath 2018-07-23 18:06:36 +03:00
tests Fix fail to recreate namespace when previous KuryrNet CRD is not deleted 2019-08-21 08:26:42 +00:00
__init__.py Implement Guru meditation reports 2017-04-13 03:19:08 +00:00
clients.py Use K8s API LB IP instead of HOST_IP in DevStack 2018-07-17 10:40:02 +02:00
config.py Add namespace isolation for services 2018-08-06 19:33:55 +02:00
constants.py Implement NPWG multi-vif driver 2018-08-09 17:31:21 +08:00
exceptions.py Implement NPWG multi-vif driver 2018-08-09 17:31:21 +08:00
k8s_client.py Raise right exception in case Kubernetes respond with not found 2019-07-09 10:42:05 +00:00
linux_net_utils.py Remove log translations 2017-03-28 15:13:49 +08:00
opts.py Get subnet_caching_opts from utils 2018-08-16 08:07:59 -04:00
os_vif_plug_noop.py Add MACVLAN based interfaces for nested containers 2017-06-12 13:14:12 +01:00
os_vif_util.py fix typos 2018-06-21 18:43:08 +08:00
utils.py Work out situation with KUBERNETES_NODE_NAME 2018-11-29 11:33:46 +00:00
version.py Implement Guru meditation reports 2017-04-13 03:19:08 +00:00
watcher.py Clean up watch resources after watcher.stop() 2018-09-24 06:59:09 +00:00