kubernetes / kube-state-metrics

Add-on agent to generate and expose cluster-level metrics.
https://kubernetes.io/docs/concepts/cluster-administration/kube-state-metrics/
Apache License 2.0
5.36k stars 2k forks source link

Take field modifications into account in CRS configurations #2262

Open rexagod opened 9 months ago

rexagod commented 9 months ago

What happened: Suppose a CR that may append fields conditionally, for eg. VPAs. For the the transient duration that it takes for the autoscaling pipeline to provide recommendations, the condition field is nil, and thus, as a result, any configurations depending on this field will cause KSM to log errors repeatedly until those fields are appended.

What you expected to happen: No error logs, and even if there were, should point out exactly which resource was causing the transient error(s) (some VPAs may be initialized sooner or later than others).

How to reproduce it (as minimally and precisely as possible): Enable KSM and use the CRS featureset on VPAs.

logicalhan commented 9 months ago

/triage accepted /assign @rexagod