---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  creationTimestamp: "2025-10-27T12:41:21Z"
  generation: 1
  labels:
    openshift.io/cluster-monitoring: ""
    prometheus.nmstate.io: "true"
  managedFields:
  - apiVersion: monitoring.coreos.com/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:labels:
          .: {}
          f:openshift.io/cluster-monitoring: {}
          f:prometheus.nmstate.io: {}
        f:ownerReferences:
          .: {}
          k:{"uid":"c449c622-896c-406e-8487-20bb9b129f67"}: {}
      f:spec:
        .: {}
        f:endpoints: {}
        f:namespaceSelector:
          .: {}
          f:matchNames: {}
        f:selector: {}
    manager: manager
    operation: Update
    time: "2025-10-27T12:41:21Z"
  name: controller-manager-metrics-monitor
  namespace: openshift-nmstate
  ownerReferences:
  - apiVersion: nmstate.io/v1
    blockOwnerDeletion: true
    controller: true
    kind: NMState
    name: nmstate
    uid: c449c622-896c-406e-8487-20bb9b129f67
  resourceVersion: "52467"
  uid: 2bd48099-2323-47da-9ad2-1f742baffb3d
spec:
  endpoints:
  - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
    metricRelabelings:
    - action: labeldrop
      regex: instance
    - action: labeldrop
      regex: job
    port: metrics
    relabelings:
    - action: labeldrop
      regex: pod
    - action: labeldrop
      regex: container
    - action: labeldrop
      regex: endpoint
    scheme: https
    tlsConfig:
      insecureSkipVerify: true
  namespaceSelector:
    matchNames:
    - openshift-nmstate
  selector:
    matchLabels:
      prometheus.nmstate.io: "true"
