kuryr-kubernetes/kuryr_kubernetes/tests/unit
Luis Tomas Bolivar e8c418c196 Pools support with Network Policies
This patch adapts the pools support to the use of Network Policies.
Unlike with the other drivers, when Network Policies are applied the
pods' ports changes their security groups while being used. That means
their original pool will not fit them anymore with the next two
consequences:
1.- Ports will have their original SG reapplied when pods are deleted,
with the consequent performance impact do to increasing the number of
calls to neutron
2.- Original pools may become useless, as different SGs are being used,
therefore wasting neutron ports

To accomodate for network policies, this patch removes the SG ids from
the pool key, merging all the pools with same network/project/host ids
but with different security groups into the same pool. This will not
change the behavior of the other drivers as there was a unique pool per
network/project/host ids already, i.e., the same SG ids were being used.
However, this will helps to avoid problem 1) as it is no longer
re-applying the SG, but simply putting the port back into its current
pool. And it will fix problem 2) as it will pick a port for an existing
pool that matches network/project/host ids. First it will search for one
with already matching SGs, and if not found, it will recycle one of the
others by reapplying the needed SGs (note it picks a port from one of
the pools that are less frequently used -- assumes they may belong to
a deleted NP that it is not needed anymore, thus removing the port
wastage problem)

Partially Implements: blueprint k8s-network-policies
Change-Id: I2c1e47fd5112c64b8e9984e5ac5d8572d91ac202
2019-02-08 17:18:45 +01:00
..
cmd Add kuryr-status utility for upgrade-checkers 2018-10-03 15:09:53 +02:00
cni Add container_id into VIFSriovDriver binding driver 2018-11-08 13:54:47 +03:00
controller Pools support with Network Policies 2019-02-08 17:18:45 +01:00
handlers Add quota readiness check to controller 2018-11-21 10:11:55 +00:00
platform OCP-Router: Fix path route to support subpath 2018-07-23 18:06:36 +03:00
__init__.py K8s and Neutron clients support 2016-10-03 16:07:03 +00:00
kuryr_fixtures.py lbaasv2: Fix for deployments missing the proxy 2018-04-13 16:47:39 +02:00
test_clients.py lbaasv2: Fix for deployments missing the proxy 2018-04-13 16:47:39 +02:00
test_k8s_client.py Fix Python 3 compatiblity in K8sClient.watch() 2018-09-12 14:10:23 -06:00
test_linux_net_utils.py Cleanup and enforce pep8 checks 2017-06-08 15:36:44 +03:00
test_object.py LBaaS driver: Add provider support 2018-09-16 15:03:08 +03:00
test_os_vif_plug_noop.py Add MACVLAN based interfaces for nested containers 2017-06-12 13:14:12 +01:00
test_os_vif_util.py Drop unnecessary import 2018-09-26 17:12:33 +02:00
test_utils.py Ensure controller healthchecks passes without CRDs 2018-12-21 12:55:55 +00:00
test_watcher.py Add quota readiness check to controller 2018-11-21 10:11:55 +00:00