SAP-archive / karydia

Kubernetes Security Walnut
Other
77 stars 10 forks source link

Add Support for Multiple Network Policies #241

Closed Neumann-Nils closed 4 years ago

Neumann-Nils commented 4 years ago

Description

This PR introduces the ability to define and manage multiple network policies using the already implemented networkPolicyReconciler. For this purpose, the reconciler was adapted to handle multiple network policies and reconcile them in a correct fashion.

A user can define multiple default network policies separating them using a ; and adjusting the value in the values.yaml. For example:

karydia-default-network-policy;karydia-default-network-policy-l2;karydia-default-network-policy-l3

Moreover, he can specify which network policies should apply to which namespace by adding the karydia.gardener.cloud/networkPolicy annotation (using the same ; separated syntax) to each namespace.

I believe that this is a rather simple solution to the problem raised in #110 but should fulfill all requirements.

Note: The currently used network policies for L2 and L3 are just placeholders (as they still need to be defined).

Resolves #110.

Checklist

Before submitting this PR, please make sure: