{{- if .Values.metrics.serviceScrape.enabled }} --- apiVersion: operator.victoriametrics.com/v1beta1 kind: VMServiceScrape metadata: labels: {{- include "athens.metaLabels" . | nindent 4 }} prometheus: default {{- with .Values.service.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} name: {{ template "fullname" . }} {{- if .Values.metrics.serviceScrape.namespace }} namespace: {{ .Values.metrics.serviceScrape.namespace }} {{- end }} spec: endpoints: - path: /metrics port: http {{- if .Values.basicAuth.enabled }} basicAuth: password: name: {{ .Values.basicAuth.secretName }} key: {{ .Values.basicAuth.passwordSecretKey }} username: name: {{ .Values.basicAuth.secretName }} key: {{ .Values.basicAuth.usernameSecretKey }} {{- end }} jobLabel: {{ template "fullname" . }} namespaceSelector: matchNames: - {{ .Release.Namespace }} selector: matchLabels: app: {{ template "fullname" . }} release: "{{ .Release.Name }}" {{- end }}