Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-22813

[2145146] CDI operator is not creating PrometheusRule resource with alerts if CDI resource is incorrect

XMLWordPrintable

    • 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:

              agilboa@redhat.com Arnon Gilboa
              jvilaca@redhat.com João Vilaça
              Yan Du Yan Du
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: