kuryr-kubernetes/kuryr_kubernetes
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 Rename kuryr-status to kuryr-k8s-status 2018-11-20 15:28:57 +01:00
cni Merge "dict_object.keys() is not required for *in* operator" 2018-12-24 10:32:57 +00: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
objects Merge "LBaaS driver: Add provider support" 2018-09-19 15:25:58 +00:00
platform OCP-Router: Fix path route to support subpath 2018-07-23 18:06:36 +03:00
tests Pools support with Network Policies 2019-02-08 17:18:45 +01:00
__init__.py Implement Guru meditation reports 2017-04-13 03:19:08 +00:00
clients.py Fix devstack deployment when ovn-provider is selected 2018-10-03 08:45:23 +02:00
config.py Merge "Removing lbaasv2 related code" 2019-01-23 00:13:24 +00:00
constants.py Update CRD when NP has namespaceSelectors 2019-01-08 20:22:02 +00:00
exceptions.py Implement NPWG multi-vif driver 2018-08-09 17:31:21 +08:00
k8s_client.py Support network policy update 2018-11-29 08:32:51 +01:00
linux_net_utils.py Remove log translations 2017-03-28 15:13:49 +08:00
opts.py Update CRD when NP has podSelectors 2019-01-02 22:14:44 +00:00
os_vif_plug_noop.py Add SR-IOV pod vif driver 2018-09-18 10:19:43 +03:00
os_vif_util.py Add SR-IOV pod vif driver 2018-09-18 10:19:43 +03:00
utils.py Ensure NP changes are applied to services 2019-01-24 13:26:47 +01:00
version.py Add kuryr-status utility for upgrade-checkers 2018-10-03 15:09:53 +02:00
watcher.py Add quota readiness check to controller 2018-11-21 10:11:55 +00:00