* feat(argo-cd) Adding applicationSet.enable and notifications.enable to allow to disable them Signed-off-by: Eric Durand <eric_p_durand@yahoo.com> * Fixing Chart version and redudant ifs Signed-off-by: Eric Durand eric_p_durand@yahoo.com Signed-off-by: Eric Durand <eric_p_durand@yahoo.com> * Detail the change Signed-off-by: Eric Durand <eric_p_durand@yahoo.com> * Drop one more redundant if Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
33 lines
1.5 KiB
YAML
33 lines
1.5 KiB
YAML
{{- if and .Values.notifications.enabled .Values.notifications.metrics.enabled .Values.notifications.metrics.serviceMonitor.enabled }}
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: {{ template "argo-cd.notifications.fullname" . }}
|
|
{{- if .Values.notifications.metrics.serviceMonitor.namespace }}
|
|
namespace: {{ .Values.notifications.metrics.serviceMonitor.namespace }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }}
|
|
{{- with .Values.notifications.metrics.serviceMonitor.selector }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.notifications.metrics.serviceMonitor.additionalLabels }}
|
|
{{- toYaml .Values.notifications.metrics.serviceMonitor.additionalLabels | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
endpoints:
|
|
- port: metrics
|
|
path: /metrics
|
|
{{- if .Values.notifications.metrics.serviceMonitor.interval }}
|
|
interval: {{ .Values.notifications.metrics.serviceMonitor.interval }}
|
|
{{- end }}
|
|
{{- if .Values.notifications.metrics.serviceMonitor.scrapeTimeout }}
|
|
scrapeTimeout: {{ .Values.notifications.metrics.serviceMonitor.scrapeTimeout }}
|
|
{{- end }}
|
|
namespaceSelector:
|
|
matchNames:
|
|
- {{ .Release.Namespace }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.notifications.name "name" "metrics") | nindent 6 }}
|
|
{{- end }}
|