apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  labels:
    name: image-registry-operator-alerts
  name: image-registry-operator-alerts
  namespace: openshift-image-registry
  annotations:
    include.release.openshift.io/ibm-cloud-managed: "true"
    include.release.openshift.io/self-managed-high-availability: "true"
    include.release.openshift.io/single-node-developer: "true"
spec:
  groups:
  - name: ImageRegistryOperator
    rules:
    - alert: ImageRegistryStorageReconfigured
      expr: increase(image_registry_operator_storage_reconfigured_total[30m]) > 0
      labels:
        severity: warning
      annotations:
        message: |
          Image Registry Storage configuration has changed in the last 30
          minutes. This change may have caused data loss.
    - expr: sum(apiserver_v1_image_imports_total)
      record: :apiserver_v1_image_imports:sum
