rhobs / rhobs/observability-operator
negative nativeHistogramBucketLimit breaks reconciliation
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 51
- Forks
- 90
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 22
Description
Creating a ServiceMonitor with nativeHistogramBucketLimit set negative (outside range of uint64) can break the operator, it was not reconciling changes to Prometheus instances while a ServiceMonitor in the namespace had the negative value set.
COO Version: 1.3.1
OCP Version: 4.18.33
ts=2026-06-12T18:25:21.159784115Z level=error caller=/cachi2/output/deps/gomod/pkg/mod/k8s.io/client-go@v0.34.2/tools/cache/reflector.go:205 msg="Failed to watch" logger=UnhandledError err="failed to list *v1.ServiceMonitor: json: cannot unmarshal number -2 into Go struct field ServiceMonitorSpec.items.spec.NativeHistogramConfig.nativeHistogramBucketLimit of type uint64" reflector=pkg/mod/k8s.io/client-go@v0.34.2/tools/cache/reflector.go:290 type=*v1.ServiceMonitor
apiVersion: monitoring.rhobs/v1
kind: ServiceMonitor
metadata:
...
spec:
nativeHistogramBucketLimit: -2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing ServiceMonitorSpec.nativeHistogramBucketLimit through the ServiceMonitor watch and reconciliation path, using the negative-value manifest and reflector error as the reproduction. Verify that a negative nativeHistogramBucketLimit no longer prevents reconciliation of Prometheus instances, and add or run the relevant validation or reconciliation checks if they exist.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100