SAP-archive / karydia

Kubernetes Security Walnut
Other
77 stars 10 forks source link

Introduce New Network Policy Levels #243

Closed Neumann-Nils closed 4 years ago

Neumann-Nils commented 4 years ago

Description

This PR introduces 3 new network policy levels, which can be described as follows:

  1. karydia-default-network-policy-l1: Block metadata service, access to kube-system namespace and access to the host network.
  2. karydia-default-network-policy-l2: Level 1 security implications and block internet access (egress).
  3. karydia-default-network-policy-l3: Level 2 security implications and block communication between different namespaces.

Each network policy is tested using e2e-tests and documented in the features.md. One can specify the used cloud provider in the values.yaml, wherefore only relevant metadata service IPs will be blocked.

Note: This PR also introduce the label kube-system karydia.gardener.cloud/name to the kube-system namespace. This is used to select this namespace in network policy level 1 and 2. A self-controlled label is preferred over a label controlled by e.g. Gardener (as it makes this feature universally useable).

Resolves #46. Resolves #188.

Checklist

Before submitting this PR, please make sure:

claassistantio commented 4 years ago

CLA assistant check
All committers have signed the CLA.