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:
[x] your code builds clean with make
[x] your code lets succeed unit tests with make test
Description
This PR removes the workaround introduces with #187 and instead uses the namespace-selector to filter out the
karydia
andkube-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:
make
make test