-
Bug
-
Resolution: Done-Errata
-
None
-
Quality / Stability / Reliability
-
False
-
-
False
-
CLOSED
-
-
-
Storage Core Sprint 229, Storage Core Sprint 230, Storage Core Sprint 231, Storage Core Sprint 232
-
Moderate
-
No
Description of problem:
When we create a CDI resource, the operator should expose the `kubevirt_cdi_cr_ready` metric, and create the `PrometheusRule` resource with the CDI alerts. Right now, if we create the CDI resource with a wrong infra node selector, the operator exposes the metric but the `PrometheusRule` is not created, and therefore alerts are not fired (namely `CDINotReady`)
See https://github.com/kubevirt/containerized-data-importer/blob/a19238ebbdadb8cc02ce91d3ed01c98935ff5475/tests/monitoring_test.go#L65 for the related test
Version-Release number of selected component (if applicable):
How reproducible: 100%
Steps to Reproduce:
1. Delete CDI if it exists
2. Create a new CDI with wrong .Spec.Infra.NodeSelector (p.e. "wrong": "wrong")
Actual results:
> kubectl get PrometheusRule -n cdi prometheus-cdi-rules
Error from server (NotFound): prometheusrules.monitoring.coreos.com "prometheus-cdi-rules" not found
Expected results:
> kubectl get PrometheusRule -n cdi prometheus-cdi-rules
NAME AGE
prometheus-cdi-rules 3m40s
Additional info:
- external trackers