From 1ff008d64a89d15d56b6d8114ad60e0afb2df95b Mon Sep 17 00:00:00 2001 From: Lucas Bickel <116588+hairmare@users.noreply.github.com> Date: Thu, 17 Mar 2022 18:15:20 +0100 Subject: [PATCH] feat(argo-cd): add notifications.metrics.serviceMonitor.selector for consistency (#1177) Signed-off-by: Lucas Bickel --- charts/argo-cd/Chart.yaml | 5 ++--- charts/argo-cd/README.md | 1 + .../templates/argocd-notifications/servicemonitor.yaml | 3 +++ charts/argo-cd/values.yaml | 3 +++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 2af74255..89ee7bae 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: v2.3.1 description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 4.0.1 +version: 4.1.0 home: https://github.com/argoproj/argo-helm icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png keywords: @@ -21,5 +21,4 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - "[Fixed]: make notification-metrics service target pods properly" - - "[Fixed]: make notification-metrics servicemonitor target service properly" + - "[Changed]: added notifications.metrics.serviceMonitor.selector value" diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index c8c6b6c0..daa7e5c1 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -749,6 +749,7 @@ NAME: my-release | notifications.metrics.service.labels | object | `{}` | Metrics service labels | | notifications.metrics.serviceMonitor.additionalLabels | object | `{}` | Prometheus ServiceMonitor labels | | notifications.metrics.serviceMonitor.enabled | bool | `false` | Enable a prometheus ServiceMonitor | +| notifications.metrics.serviceMonitor.selector | object | `{}` | Prometheus ServiceMonitor selector | | notifications.name | string | `"notifications-controller"` | Notifications controller name string | | notifications.nodeSelector | object | `{}` | [Node selector] | | notifications.notifiers | object | See [values.yaml] | Configures notification services | diff --git a/charts/argo-cd/templates/argocd-notifications/servicemonitor.yaml b/charts/argo-cd/templates/argocd-notifications/servicemonitor.yaml index 7d0c0476..d4554421 100644 --- a/charts/argo-cd/templates/argocd-notifications/servicemonitor.yaml +++ b/charts/argo-cd/templates/argocd-notifications/servicemonitor.yaml @@ -8,6 +8,9 @@ metadata: {{- 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 }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index 8eb949bf..3ebef289 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -2157,6 +2157,9 @@ notifications: serviceMonitor: # -- Enable a prometheus ServiceMonitor enabled: false + # -- Prometheus ServiceMonitor selector + selector: {} + # prometheus: kube-prometheus # -- Prometheus ServiceMonitor labels additionalLabels: {} # namespace: monitoring