---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  annotations:
    hostpathprovisioner.kubevirt.io/lastAppliedConfiguration: '{"kind":"PrometheusRule","apiVersion":"monitoring.coreos.com/v1","metadata":{"name":"prometheus-hpp-rules","namespace":"openshift-cnv","creationTimestamp":null,"labels":{"app.kubernetes.io/component":"storage","app.kubernetes.io/managed-by":"hostpath-provisioner-operator","app.kubernetes.io/part-of":"hyperconverged-cluster","app.kubernetes.io/version":"4.19.11","k8s-app":"hostpath-provisioner","prometheus.hostpathprovisioner.kubevirt.io":"true"}},"spec":{"groups":[{"name":"recordingRules.rules","rules":[{"record":"kubevirt_hpp_operator_up","expr":"sum(up{namespace=''openshift-cnv'',
      pod=~''hostpath-provisioner-operator-.*''} or vector(0))"}]},{"name":"alerts.rules","rules":[{"alert":"HPPNotReady","expr":"kubevirt_hpp_cr_ready
      == 0","for":"5m","labels":{"kubernetes_operator_component":"hostpath-provisioner-operator","kubernetes_operator_part_of":"kubevirt","operator_health_impact":"critical","severity":"warning"},"annotations":{"runbook_url":"https://github.com/openshift/runbooks/blob/master/alerts/openshift-virtualization-operator/HPPNotReady.md","summary":"Hostpath
      Provisioner is not available to use."}},{"alert":"HPPOperatorDown","expr":"kubevirt_hpp_operator_up
      == 0","for":"5m","labels":{"kubernetes_operator_component":"hostpath-provisioner-operator","kubernetes_operator_part_of":"kubevirt","operator_health_impact":"critical","severity":"warning"},"annotations":{"runbook_url":"https://github.com/openshift/runbooks/blob/master/alerts/openshift-virtualization-operator/HPPOperatorDown.md","summary":"Hostpath
      Provisioner operator is down."}},{"alert":"HPPSharingPoolPathWithOS","expr":"kubevirt_hpp_pool_path_shared_with_os
      == 1","for":"1m","labels":{"kubernetes_operator_component":"hostpath-provisioner-operator","kubernetes_operator_part_of":"kubevirt","operator_health_impact":"warning","severity":"warning"},"annotations":{"runbook_url":"https://github.com/openshift/runbooks/blob/master/alerts/openshift-virtualization-operator/HPPSharingPoolPathWithOS.md","summary":"HPP
      pool path sharing a filesystem with OS, fix to prevent HPP PVs from causing
      disk pressure and affecting node operation."}}]}]}}'
  creationTimestamp: "2025-10-29T11:56:00Z"
  generation: 1
  labels:
    app.kubernetes.io/component: storage
    app.kubernetes.io/managed-by: hostpath-provisioner-operator
    app.kubernetes.io/part-of: hyperconverged-cluster
    app.kubernetes.io/version: 4.19.11
    k8s-app: hostpath-provisioner
    prometheus.hostpathprovisioner.kubevirt.io: "true"
  managedFields:
  - apiVersion: monitoring.coreos.com/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .: {}
          f:hostpathprovisioner.kubevirt.io/lastAppliedConfiguration: {}
        f:labels:
          .: {}
          f:app.kubernetes.io/component: {}
          f:app.kubernetes.io/managed-by: {}
          f:app.kubernetes.io/part-of: {}
          f:app.kubernetes.io/version: {}
          f:k8s-app: {}
          f:prometheus.hostpathprovisioner.kubevirt.io: {}
      f:spec:
        .: {}
        f:groups:
          .: {}
          k:{"name":"alerts.rules"}:
            .: {}
            f:name: {}
            f:rules: {}
          k:{"name":"recordingRules.rules"}:
            .: {}
            f:name: {}
            f:rules: {}
    manager: hostpath-provisioner-operator
    operation: Update
    time: "2025-10-29T11:56:00Z"
  name: prometheus-hpp-rules
  namespace: openshift-cnv
  resourceVersion: "2148648"
  uid: b1aca09b-73d1-43ea-ba35-33d919a99409
spec:
  groups:
  - name: recordingRules.rules
    rules:
    - expr: sum(up{namespace='openshift-cnv', pod=~'hostpath-provisioner-operator-.*'}
        or vector(0))
      record: kubevirt_hpp_operator_up
  - name: alerts.rules
    rules:
    - alert: HPPNotReady
      annotations:
        runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/openshift-virtualization-operator/HPPNotReady.md
        summary: Hostpath Provisioner is not available to use.
      expr: kubevirt_hpp_cr_ready == 0
      for: 5m
      labels:
        kubernetes_operator_component: hostpath-provisioner-operator
        kubernetes_operator_part_of: kubevirt
        operator_health_impact: critical
        severity: warning
    - alert: HPPOperatorDown
      annotations:
        runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/openshift-virtualization-operator/HPPOperatorDown.md
        summary: Hostpath Provisioner operator is down.
      expr: kubevirt_hpp_operator_up == 0
      for: 5m
      labels:
        kubernetes_operator_component: hostpath-provisioner-operator
        kubernetes_operator_part_of: kubevirt
        operator_health_impact: critical
        severity: warning
    - alert: HPPSharingPoolPathWithOS
      annotations:
        runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/openshift-virtualization-operator/HPPSharingPoolPathWithOS.md
        summary: HPP pool path sharing a filesystem with OS, fix to prevent HPP PVs
          from causing disk pressure and affecting node operation.
      expr: kubevirt_hpp_pool_path_shared_with_os == 1
      for: 1m
      labels:
        kubernetes_operator_component: hostpath-provisioner-operator
        kubernetes_operator_part_of: kubevirt
        operator_health_impact: warning
        severity: warning
