{{- if .Values.observability.enabled }} apiVersion: operator.victoriametrics.com/v1beta1 kind: VMServiceScrape metadata: name: {{ include "movienight.fullname" . }}-scrape labels: {{- include "movienight.componentLabels" (dict "root" . "component" "scrape") | nindent 4 }} {{- with .Values.observability.scrape.labels }} {{- toYaml . | nindent 4 }} {{- end }} {{- if .Values.global.annotations }} annotations: {{- with .Values.global.annotations }} {{- toYaml . | nindent 4 }} {{- end }} {{- end }} spec: selector: matchLabels: {{- include "movienight.componentSelectorLabels" (dict "root" . "component" "backend") | nindent 6 }} namespaceSelector: matchNames: - {{ .Release.Namespace }} endpoints: - port: management path: /actuator/prometheus interval: 10s podTargetLabels: - app.kubernetes.io/component - app.kubernetes.io/instance {{- end }}