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:
The operator is probably crashing because of this config error, and thus cannot deploy the resources If that is the case, CDI CR status should reflect that CDI is in a "failing" state If not, we could take a look at the operator logs to understand what is happening
Arnon, looks like this failed QA. Please take a look.
Sure Adam, I'm on it. It's a tier-1 test bug failing it D/S.
Verified on CNV v4.12.1-40
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Virtualization 4.12.6 Images), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2023:4982