apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: coredns
  namespace: kube-system
  labels:
    app.kubernetes.io/managed-by: "Helm"
    app.kubernetes.io/instance: "coredns"
    helm.sh/chart: "coredns-1.45.2"
    k8s-app: coredns
    kubernetes.io/cluster-service: "true"
    kubernetes.io/name: "CoreDNS"
    app.kubernetes.io/name: coredns
spec:
  selector:
    matchLabels:
      app.kubernetes.io/instance: "coredns"
      k8s-app: coredns
      app.kubernetes.io/name: coredns
      app.kubernetes.io/component: metrics
  endpoints:
    - port: metrics
