---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  creationTimestamp: "2025-10-27T12:42:17Z"
  generation: 1
  labels:
    app: local-storage-operator
  managedFields:
  - apiVersion: monitoring.coreos.com/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:labels:
          .: {}
          f:app: {}
        f:ownerReferences:
          .: {}
          k:{"uid":"427f8d72-a9ea-490e-979f-892c26a85462"}: {}
      f:spec:
        .: {}
        f:groups:
          .: {}
          k:{"name":"local-storage-operator.rules"}:
            .: {}
            f:name: {}
            f:rules: {}
          k:{"name":"lvset_deletion_alerts"}:
            .: {}
            f:name: {}
            f:rules: {}
    manager: local-storage-operator
    operation: Update
    time: "2025-10-27T12:42:17Z"
  name: local-storage-operator
  namespace: openshift-local-storage
  ownerReferences:
  - apiVersion: local.storage.openshift.io/v1
    blockOwnerDeletion: false
    controller: false
    kind: LocalVolume
    name: local-block-ocs
    uid: 427f8d72-a9ea-490e-979f-892c26a85462
  resourceVersion: "54608"
  uid: 26a6e65b-6d88-4ad8-8e33-fb82edc1f1d8
spec:
  groups:
  - name: local-storage-operator.rules
    rules:
    - alert: LSONoDiskManagerReplicas
      annotations:
        description: |
          Local Storage Operator disk-manager DaemonSet does not have any scheduled replicas.
          This DaemonSet handles LocalVolume and LocalVolumeSet objects and creates
          PersistentVolumes (PVs) for devices described in these objects. As result, Local
          Storage Operator is not able to create the PVs.
          Please check all LocalVolume and LocalVolumeSet objects and make sure that they have
          correct "nodeSelector" and "tolerations" fields, and there are nodes that match the
          nodeSelector and all taints of the matching nodes are tolerated.
          A frequent issue is that nodes that run OpenShift Data Foundation (ODF) are tainted,
          so only ODF runs on these nodes. In that case, LocalVolume / LocalVolumeSet objects
          must tolerate such a taint to provide disks for ODF on the nodes.
        summary: LocalVolume / LocalVolumeSet does not match any node
      expr: max_over_time(kube_daemonset_status_desired_number_scheduled{namespace="openshift-local-storage",
        daemonset="diskmaker-manager"}[5m]) == 0
      for: 10m
      labels:
        severity: warning
  - name: lvset_deletion_alerts
    rules:
    - alert: LvSetDeletionAlert
      annotations:
        description: LocalVolumeSet {{ $labels.lvSetName }} has been marked for deletion
          for more than 72 hours.
        summary: LocalVolumeSet has had a deletion timestamp older than 72 hours
      expr: lso_lvset_deletion_timestamp > 0 and time() - lso_lvset_deletion_timestamp
        > 72 * 3600
      for: 1m
      labels:
        severity: warning
