---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
metadata:
  name: nginx-cache
spec:
  jobLabel: jobLabel
  namespaceSelector:
    matchNames:
    - infra-nginx-cache
  endpoints:
  - path: /metrics
    port: metrics
    honorLabels: true
    relabelConfigs:
    - replacement: nginx-cache
      targetLabel: job
    - source_labels: [__meta_kubernetes_service_name]
      target_label: instance
    - sourceLabels: [__meta_kubernetes_pod_node_name]
      targetLabel: node
    - targetLabel: tier
      replacement: cluster
  selector:
    matchLabels:
      app: {{ $.Release.Name }}-nginx-cache
