2021-11-09 21:14:17 +00:00
|
|
|
{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
|
|
|
|
apiVersion: monitoring.coreos.com/v1
|
|
|
|
kind: ServiceMonitor
|
|
|
|
metadata:
|
|
|
|
name: {{ include "argocd-image-updater.fullname" . }}-metrics
|
2024-03-01 08:41:23 +00:00
|
|
|
namespace: {{ default (include "argocd-image-updater.namespace" .) .Values.metrics.serviceMonitor.namespace | quote }}
|
2021-11-09 21:14:17 +00:00
|
|
|
labels:
|
|
|
|
{{- include "argocd-image-updater.labels" . | nindent 4 }}
|
|
|
|
{{- with .Values.metrics.serviceMonitor.selector }}
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.metrics.serviceMonitor.additionalLabels }}
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
|
|
|
endpoints:
|
|
|
|
- port: metrics
|
|
|
|
{{- with .Values.metrics.serviceMonitor.interval }}
|
|
|
|
interval: {{ . }}
|
|
|
|
{{- end }}
|
|
|
|
path: /metrics
|
|
|
|
{{- with .Values.metrics.serviceMonitor.relabelings }}
|
|
|
|
relabelings:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.metrics.serviceMonitor.metricRelabelings }}
|
|
|
|
metricRelabelings:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
namespaceSelector:
|
|
|
|
matchNames:
|
2024-03-01 08:41:23 +00:00
|
|
|
- {{ include "argocd-image-updater.namespace" . | quote }}
|
2021-11-09 21:14:17 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{- include "argocd-image-updater.selectorLabels" . | nindent 6 }}
|
|
|
|
{{- end }}
|