39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
|
|
{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
|
||
|
|
apiVersion: monitoring.coreos.com/v1
|
||
|
|
kind: ServiceMonitor
|
||
|
|
metadata:
|
||
|
|
name: {{ template "argo-applicationset.fullname" . }}
|
||
|
|
{{- if .Values.metrics.serviceMonitor.namespace }}
|
||
|
|
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
|
||
|
|
{{- end }}
|
||
|
|
labels:
|
||
|
|
{{- include "argo-applicationset.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:
|
||
|
|
- {{ .Release.Namespace }}
|
||
|
|
selector:
|
||
|
|
matchLabels:
|
||
|
|
{{- include "argo-applicationset.selectorLabels" . | nindent 6 }}
|
||
|
|
{{- end }}
|