From 03140b36fcef6e0268b72fc73345edd9c642e85f Mon Sep 17 00:00:00 2001 From: Sergey Shaykhullin <46970457+sergeyshaykhullin@users.noreply.github.com> Date: Thu, 3 Jun 2021 13:07:47 +0300 Subject: [PATCH] feat(argocd-notifications): Add metrics service labels and annotations (#783) * feat(argocd-notifications): Add metrics service labels and annotations Signed-off-by: Sergey Shaykhullin * Update charts/argocd-notifications/templates/service-metrics.yaml Co-authored-by: Marco Kilchhofer Signed-off-by: Sergey Shaykhullin * Update charts/argocd-notifications/templates/service-metrics.yaml Co-authored-by: Marco Kilchhofer Signed-off-by: Sergey Shaykhullin * Update _helpers.tpl Signed-off-by: Sergey Shaykhullin * Update _helpers.tpl Signed-off-by: Sergey Shaykhullin * Delete templated.yaml Signed-off-by: Sergey Shaykhullin Co-authored-by: Marco Kilchhofer --- charts/argocd-notifications/Chart.yaml | 2 +- charts/argocd-notifications/templates/service-metrics.yaml | 7 +++++++ charts/argocd-notifications/values.yaml | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/charts/argocd-notifications/Chart.yaml b/charts/argocd-notifications/Chart.yaml index 9be1b26b..cf33a5d9 100644 --- a/charts/argocd-notifications/Chart.yaml +++ b/charts/argocd-notifications/Chart.yaml @@ -3,7 +3,7 @@ appVersion: 1.1.1 description: A Helm chart for ArgoCD notifications, an add-on to ArgoCD. name: argocd-notifications type: application -version: 1.3.2 +version: 1.4.0 home: https://github.com/argoproj/argo-helm icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png keywords: diff --git a/charts/argocd-notifications/templates/service-metrics.yaml b/charts/argocd-notifications/templates/service-metrics.yaml index 5645a4d3..aea5d90e 100644 --- a/charts/argocd-notifications/templates/service-metrics.yaml +++ b/charts/argocd-notifications/templates/service-metrics.yaml @@ -5,6 +5,13 @@ metadata: name: {{ include "argocd-notifications.name" . }}-metrics labels: {{- include "argocd-notifications.metrics.labels" . | nindent 4 }} + {{- with .Values.metrics.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.metrics.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: selector: {{- include "argocd-notifications.selectorLabels" . | nindent 4 }} diff --git a/charts/argocd-notifications/values.yaml b/charts/argocd-notifications/values.yaml index f258401f..ff5ca14d 100644 --- a/charts/argocd-notifications/values.yaml +++ b/charts/argocd-notifications/values.yaml @@ -52,6 +52,9 @@ extraArgs: [] metrics: enabled: false port: 9001 + service: + annotations: {} + labels: {} serviceMonitor: enabled: false additionalLabels: {}