apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  labels:
    name: image-registry-operator-alerts
  name: image-registry-operator-alerts
  namespace: openshift-image-registry
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.
  - name: ImagePruner
    rules:
    - alert: ImagePrunerIsFailing
      expr: image_registry_operator_image_pruner_job_status == 1
      labels:
        severity: warning
      annotations:
        message: |
          Image Pruner job is failing, please check job output log.
