2023-07-18 09:51:14 +03:00
{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.repoServer.metrics.enabled .Values.repoServer.metrics.serviceMonitor.enabled }}
2019-11-04 16:17:25 -08:00
apiVersion : monitoring.coreos.com/v1
kind : ServiceMonitor
metadata :
name : {{ template "argo-cd.repoServer.fullname" . }}
2023-04-13 16:08:34 +02:00
namespace : {{ default .Release.Namespace .Values.repoServer.metrics.serviceMonitor.namespace | default }}
2019-11-04 16:17:25 -08:00
labels :
2021-03-22 21:15:37 +01:00
{{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 4 }}
2021-08-25 17:04:29 +02:00
{{- with .Values.repoServer.metrics.serviceMonitor.selector }}
{{- toYaml . | nindent 4 }}
2019-12-05 05:47:15 +02:00
{{- end }}
2021-08-25 17:04:29 +02:00
{{- with .Values.repoServer.metrics.serviceMonitor.additionalLabels }}
{{- toYaml . | nindent 4 }}
2019-11-04 16:17:25 -08:00
{{- end }}
2022-10-21 09:10:53 +01:00
{{- with .Values.repoServer.metrics.serviceMonitor.annotations }}
annotations :
{{- toYaml . | nindent 4 }}
{{- end }}
2019-11-04 16:17:25 -08:00
spec :
endpoints :
2022-05-10 09:40:49 +02:00
- port : {{ .Values.repoServer.metrics.service.portName }}
2021-06-26 17:04:59 +02:00
{{- with .Values.repoServer.metrics.serviceMonitor.interval }}
2021-05-21 15:43:10 +03:00
interval : {{ . }}
{{- end }}
2024-02-12 21:36:39 +03:00
{{- with .Values.repoServer.metrics.serviceMonitor.scrapeTimeout }}
scrapeTimeout : {{ . }}
{{- end }}
2019-11-04 16:17:25 -08:00
path : /metrics
2021-08-25 17:04:29 +02:00
{{- with .Values.repoServer.metrics.serviceMonitor.relabelings }}
relabelings :
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.repoServer.metrics.serviceMonitor.metricRelabelings }}
metricRelabelings :
{{- toYaml . | nindent 8 }}
{{- end }}
2022-05-10 09:40:49 +02:00
{{- with .Values.repoServer.metrics.serviceMonitor.scheme }}
scheme : {{ . }}
{{- end }}
{{- with .Values.repoServer.metrics.serviceMonitor.tlsConfig }}
tlsConfig :
{{- toYaml . | nindent 8 }}
{{- end }}
2019-11-04 16:17:25 -08:00
namespaceSelector :
matchNames :
2024-05-14 17:17:31 +02:00
- {{ include "argo-cd.namespace" . }}
2019-11-04 16:17:25 -08:00
selector :
matchLabels :
2021-03-22 21:15:37 +01:00
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.repoServer.name "name" (printf "%s-metrics" .Values.repoServer.name)) | nindent 6 }}
2019-12-05 05:47:15 +02:00
{{- end }}