Files
devops-infra-helm-charts-gcp/helm-templates/athens-proxy/templates/service-scrape.yaml
T
2026-08-26 03:39:42 +05:30

39 lines
1.0 KiB
YAML

{{- 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 }}