SAP-archive / karydia

Kubernetes Security Walnut
Other
77 stars 10 forks source link

Use Namespace-Selector and Object-Selector to filter out specific Namespaces/Objects #258

Closed Neumann-Nils closed 4 years ago

Neumann-Nils commented 4 years ago

Description

This PR removes the workaround introduces with #187 and instead uses the namespace-selector to filter out the karydia and kube-system namespace.

When using the annotations introduced with #187, ressources (and the namespaces itself) are still processed by the webhook. Later, we use these annotations to decide that we won't change these ressources (as they are annotated).

Using the namespace-selector, events regarding these ressources (and the namespaces itself) should not be passed to Karydia's webhook in the first place. Thus, having the same effect while helping to prevent any unwanted errors and race-conditions.

Checklist

Before submitting this PR, please make sure:

Neumann-Nils commented 4 years ago

For a full list of objects/namespaces to exclude, see https://github.com/gardener/gardener/pull/2270