apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: harbor
  namespace: monitoring
  labels:
    app.kubernetes.io/part-of: osdc-monitoring
spec:
  namespaceSelector:
    matchNames:
      - harbor-system
  selector:
    matchLabels:
      app: harbor
  endpoints:
    - port: http-metrics
      interval: 60s
      metricRelabelings:
        # Drop Go runtime and process metrics — no operational value
        - action: drop
          sourceLabels: [__name__]
          regex: "go_.*|process_.*|promhttp_.*"
