wave-k8s / wave

Kubernetes configuration tracking controller
Apache License 2.0
646 stars 82 forks source link

add predicate to only trigger on spec or annotation changes #168

Closed jabdoa2 closed 1 month ago

jabdoa2 commented 1 month ago

On our clusters (1k Deployments, 5k Secrets) wave does not use significant CPU (about 10m) or memory (250MB). However, it causes API requests (not excessive but still more than 0) and we try to minimize that to keep kube-apiserver and etcd responsive.

The best way to improve performance it so do less. Previously, wave would trigger on changes in the status resource of Deployments, StatefulSets and DaemonSets. Those changes obviously are not interesting at all for wave and only cause noop reconciles.

This change will change the watch to only trigger a reconcile when annotations change or the spec changes.