flant / addon-operator

A system to manage additional components for Kubernetes cluster in a simple, consistent and automated way.
https://flant.github.io/addon-operator/
Apache License 2.0
483 stars 27 forks source link

List only metadata in resource monitor #388

Closed nabokihms closed 1 year ago

nabokihms commented 1 year ago

Overview

Helm resource monitor only checks wether objects exist in the cluster or not. Now it uses a dynamic client but only extracts the names of objects. With the metadata client, addon-operator can only get the information needed to make a decision.

What this PR does / why we need it

In the standby node, the resource monitor is 1/3 of all allocations.

Before:

image

After (during converge): image

Special notes for your reviewer

https://pkg.go.dev/k8s.io/client-go/metadata