---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMPodScrape
metadata:
  name: nginx-ingress-controller
spec:
  jobLabel: jobLabel
  namespaceSelector:
    matchNames:
    - {{ .Release.Namespace }}
  podMetricsEndpoints:
  - port: metrics
    honorLabels: true
    interval: 30s
    relabelConfigs:
    - replacement: nginx-ingress-controller
      targetLabel: job
    - sourceLabels: [__meta_kubernetes_pod_node_name]
      targetLabel: node
    - targetLabel: tier
      replacement: cluster
  selector:
    matchLabels:
      app.kubernetes.io/component: controller
      app.kubernetes.io/name: ingress-nginx
---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMPodScrape
metadata:
  name: nginx-ingress-controller-detailed
spec:
  jobLabel: jobLabel
  namespaceSelector:
    matchNames:
    - {{ .Release.Namespace }}
  podMetricsEndpoints:
  - port: metrics2
    honorLabels: true
    interval: 30s
    relabelConfigs:
    - replacement: nginx-ingress-controller
      targetLabel: job
    - sourceLabels: [__meta_kubernetes_pod_node_name]
      targetLabel: node
    - sourceLabels: [__meta_kubernetes_pod_label_app_kubernetes_io_name]
      targetLabel: controller
    - targetLabel: tier
      replacement: cluster
  selector:
    matchLabels:
      app.kubernetes.io/component: controller
      app.kubernetes.io/name: ingress-nginx
