apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: manila-csi-driver-controller-monitor
  namespace: openshift-manila-csi-driver
spec:
  endpoints:
  - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
    interval: 30s
    path: /metrics
    port: provisioner-m
    scheme: https
    tlsConfig:
      caFile: /etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt
      serverName: manila-csi-driver-controller-metrics.openshift-manila-csi-driver.svc
  - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
    interval: 30s
    path: /metrics
    port: snapshotter-m
    scheme: https
    tlsConfig:
      caFile: /etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt
      serverName: manila-csi-driver-controller-metrics.openshift-manila-csi-driver.svc
  jobLabel: component
  selector:
    matchLabels:
      app: manila-csi-driver-controller-metrics
