Open roeoo opened 3 weeks ago
Actually nilIsZero
might be a better solution giving users some control. It would set all states to zero by default similarly to gauges.
After some more thinking, nilIsZero
makes sense only when used with a singular gauge where all labels are known upfront. For generated labels, there is no way to create a sensible metric when some labels are missing.
Thus it should be a normal case for series to not exist, not an error.
/assign @rexagod /triage accepted
What happened: Spam of errors that look like this:
What you expected to happen:
There should be no errors logged. Status fields are not guaranteed to exist at resource creation. The behavior is not consistent with known types where a default value is taken.
How to reproduce it (as minimally and precisely as possible):
Create
cr-config.yaml
:Create a CRD with status and a valid object. Do not run a controller (this is one of possible scenarios).
Run:
The error repeats for every instance of a resource, and there can be thousands of such resources.
Anything else we need to know?:
I believe is a general problem for all CRDs and all status fields. Since there can be many differing objects, the error isn't helpful enough. Might be useful to log this only in verbose mode with resource name and kind.
Environment: kind or any other Kubernetes cluster
kubectl version
): Client Version: v1.30.2 (shouldn't matter)