{{- if and .Values.istiod.telemetry.enabled .Values.rateLimiting.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: istio-rate-limiting
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "kubezero-lib.labels" . | nindent 4 }}
spec:
  jobLabel: istio
  targetLabels: [app]
  selector:
    matchExpressions:
    - {key: app, operator: In, values: [ratelimit]}
  endpoints:
  - port: http-monitoring
{{- end }}