kuryr-kubernetes/kuryr_kubernetes/tests/unit/controller
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
..
drivers Pools support with Network Policies 2019-02-08 17:18:45 +01:00
handlers Ensure NP changes are applied to services 2019-01-24 13:26:47 +01:00
ingress OCP-Router - Fix Ingress controller LB listener creation 2018-08-22 14:24:12 +03:00
managers Ensure controller healthchecks passes without CRDs 2018-12-21 12:55:55 +00:00
__init__.py Controller service base 2016-10-04 21:56:50 +03:00
test_service.py Kuryr-Controller: make handlers pluggable 2018-04-17 17:02:00 +03:00