Commit Graph

7 Commits

Author SHA1 Message Date
Luis Tomas Bolivar 9acfd8faa8 Remove namespace isolation support
NetworkPolicy can replicate what namespace isolation does (and much
more), so we are removing the code that is not needed

Change-Id: Ib79c21cb92c522744658a204001383b6c0e98846
2020-02-03 12:48:10 +01:00
Roman Dobosz cb2f8fe874 Update namespace_security_groups driver to use OpenStackSDK.
Implements: blueprint switch-to-openstacksdk
Change-Id: Id447b376ae8c10bc2658ba30f2b2009ea8c0cf08
2020-01-20 09:58:27 +01:00
Maysa Macedo bf848c5b22 Fix CRD update when NP has namespaceSelectors
To enforce the network policy isolation, the network policy
security group driver must be used. Thus the code needs to be
there instead of in the namespace security group driver (which
is used for namespace isolation)

Currently, when using the correct Network Policy drivers and
handlers the CRD is not updated on events applied over namespaces
that matches a NP.
This commit fixes the issue by moving the support of this
functionality from 'NamespacePodSecurityGroupsDriver' to
NetworkPolicySecurityGroupsDriver.

Closes-bug: 1811995
Partially Implements: blueprint k8s-network-policies
Change-Id: Idaf70ea8cb7677296d6bea59b4d551bbb87e0422
2019-01-23 16:07:17 +00:00
Maysa Macedo 9deb322962 Update CRD when NP has namespaceSelectors
When a namespace is created, deleted or updated and
its labels matches the namespaceSelector of a NP,
the CRD and the respective sg must be updated.

Partially Implements: blueprint k8s-network-policies

Change-Id: I515de28647f5f06248555733c27dd4f5a56149ec
2019-01-08 20:22:02 +00:00
Luis Tomas Bolivar 66fb9d18df Add namespace isolation for services
This patch ensures pods from namespace X cannot access services
pointing to pods on namespace Y, and vice versa.

The exceptions are:
- Pods on default namespace can access all the services
- Services on default namespace can be accessed by all the pods

Depends-On: I37025bf65b67fe04f2a6d9b14bbe1b7bc387e370
Implements: blueprint openshift-project-isolation-support
Change-Id: I7b78e12cdf2bce5d0780e582814ef51ef0c459a7
2018-08-06 19:33:55 +02:00
Luis Tomas Bolivar 46c609f285 Avoid namespace security group overwrite
Ensure default security group value does not get overwritten in
subsequent calls to get_security_groups

Closes-Bug: 1785035
Change-Id: I9a79601beae7d58027418e0a9e3c4768606eb15f
2018-08-02 18:45:57 +02:00
Luis Tomas Bolivar f02b2e99e9 Ensure isolation between namespaces
This patch ensures that a different security group is attached to
each newly created namespace. Thus providing extra isolation
between the pods allocated on the different namespaces.

Implements: blueprint openshift-project-isolation-support
Change-Id: Ibf63841b2a6b0c339c4c76980f1489e26af016d7
2018-08-01 13:46:05 +02:00