fix: Also implement it on some missing resources

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
Marco Kilchhofer 2023-04-13 14:26:16 +02:00
parent bf2e21b9e2
commit e3fc38faed
No known key found for this signature in database
GPG key ID: B245E91D6918EC26
8 changed files with 8 additions and 26 deletions

View file

@ -3,9 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ template "argo-cd.controller.fullname" . }}
{{- if .Values.controller.metrics.rules.namespace }}
namespace: {{ .Values.controller.metrics.rules.namespace }}
{{- end }}
namespace: {{ default .Release.Namespace .Values.controller.metrics.rules.namespace | quote }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
{{- if .Values.controller.metrics.rules.selector }}

View file

@ -3,9 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "argo-cd.controller.fullname" . }}
{{- with .Values.controller.metrics.serviceMonitor.namespace }}
namespace: {{ . }}
{{- end }}
namespace: {{ default .Release.Namespace .Values.controller.metrics.serviceMonitor.namespace | quote }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
{{- with .Values.controller.metrics.serviceMonitor.selector }}

View file

@ -4,9 +4,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "argo-cd.applicationSet.fullname" . }}
{{- with .Values.applicationSet.metrics.serviceMonitor.namespace }}
namespace: {{ . }}
{{- end }}
namespace: {{ default .Release.Namespace .Values.applicationSet.metrics.serviceMonitor.namespace | quote }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
{{- with .Values.applicationSet.metrics.serviceMonitor.selector }}

View file

@ -3,11 +3,7 @@ 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 }}
{{- else }}
namespace: {{ .Release.Namespace | quote }}
{{- end }}
namespace: {{ default .Release.Namespace .Values.notifications.metrics.serviceMonitor.namespace | quote }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }}
{{- with .Values.notifications.metrics.serviceMonitor.selector }}

View file

@ -3,9 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "argo-cd.repoServer.fullname" . }}
{{- with .Values.repoServer.metrics.serviceMonitor.namespace }}
namespace: {{ . }}
{{- end }}
namespace: {{ default .Release.Namespace .Values.repoServer.metrics.serviceMonitor.namespace | default }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 4 }}
{{- with .Values.repoServer.metrics.serviceMonitor.selector }}

View file

@ -3,9 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "argo-cd.server.fullname" . }}
{{- if .Values.server.metrics.serviceMonitor.namespace }}
namespace: {{ .Values.server.metrics.serviceMonitor.namespace }}
{{- end }}
namespace: {{ default .Release.Namespace .Values.server.metrics.serviceMonitor.namespace | quote }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
{{- with .Values.server.metrics.serviceMonitor.selector }}

View file

@ -3,9 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "argo-cd.dex.fullname" . }}
{{- with .Values.dex.metrics.serviceMonitor.namespace }}
namespace: {{ . }}
{{- end }}
namespace: {{ default .Release.Namespace .Values.dex.metrics.serviceMonitor.namespace | quote }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 4 }}
{{- with .Values.dex.metrics.serviceMonitor.selector }}

View file

@ -4,9 +4,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "argo-cd.redis.fullname" . }}
{{- with .Values.redis.metrics.serviceMonitor.namespace }}
namespace: {{ . }}
{{- end }}
namespace: {{ default .Release.Namespace .Values.redis.metrics.serviceMonitor.namespace | quote }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }}
{{- with .Values.redis.metrics.serviceMonitor.selector }}