apiVersion: v1
kind: Service
metadata:
  name: istio-ingressgateway-stats
  namespace: ingress-nginx
  labels:
    istio: ingressgateway-stats
spec:
  selector:
    istio: ingressgateway
  ports:
    - name: stats
      port: 15020
      targetPort: 15020
---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
metadata:
  name: istio-ingressgateway-stats
  namespace: prometheus-stack
spec:
  namespaceSelector:
    matchNames:
      - ingress-nginx
  selector:
    matchLabels:
      istio: ingressgateway-stats
  endpoints:
    - port: stats
      path: /stats/prometheus
      interval: 15s
