open-policy-agent / kube-mgmt

Sidecar for managing OPA instances in Kubernetes.
Apache License 2.0
239 stars 106 forks source link

Ignore namespaces #186

Closed tehlers320 closed 1 year ago

tehlers320 commented 1 year ago

We have a need to ignore namespaces, how can i cleanup this config for merge to main?

What happens is when you load configmaps for whatever reason all the leader elections update every X seconds and then kube-mgmt then bombards OPA with reloads. This has the effect of driving load thru the roof, see screenshot below. This is a 5 second trace and the heap is going crazy!!! Screenshot 2023-02-21 at 4 18 53 PM

CPU before/after

Screenshot 2023-02-21 at 8 09 21 PM
tehlers320 commented 1 year ago

closing in favor of https://github.com/open-policy-agent/kube-mgmt/pull/190 as im unsure how to ignore specific annotations