From cd7cbf807788c3621870bfe71abe1189a6e5527e Mon Sep 17 00:00:00 2001 From: sungil Date: Tue, 5 Dec 2023 00:14:22 +0000 Subject: [PATCH] lma-addons: add servicemonitor for argo-rollouts --- lma-addons/Chart.yaml | 2 +- .../service-monitor/argo-rollouts.yaml | 37 +++++++++++++++++++ lma-addons/values.yaml | 7 ++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 lma-addons/templates/service-monitor/argo-rollouts.yaml diff --git a/lma-addons/Chart.yaml b/lma-addons/Chart.yaml index cb69908b..2491aecd 100644 --- a/lma-addons/Chart.yaml +++ b/lma-addons/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 appVersion: "1.0" description: Kubernetes Resources for TACO Project name: lma-addons -version: 1.8.6 +version: 1.8.7 diff --git a/lma-addons/templates/service-monitor/argo-rollouts.yaml b/lma-addons/templates/service-monitor/argo-rollouts.yaml new file mode 100644 index 00000000..fce67a3b --- /dev/null +++ b/lma-addons/templates/service-monitor/argo-rollouts.yaml @@ -0,0 +1,37 @@ +{{- if and .Values.serviceMonitor.enabled .Values.serviceMonitor.argoRollout.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app.kubernetes.io/component: rollouts-controller + app.kubernetes.io/instance: argo-rollouts + app.kubernetes.io/name: argo-rollouts + name: argo-rollouts + namespace: {{ .Release.Namespace }} +spec: + jobLabel: argo-rollouts + namespaceSelector: + {{- if .Values.serviceMonitor.argoRollout.targetNamespace }} + matchNames: + - {{.Values.serviceMonitor.argoRollout.targetNamespace }} + {{- else}} + any: true + {{- end }} + selector: + matchLabels: + app.kubernetes.io/component: rollouts-controller + app.kubernetes.io/instance: argo-rollouts + app.kubernetes.io/name: argo-rollouts + endpoints: + - port: metrics + {{- if .Values.serviceMonitor.argoRollout.interval }} + interval: {{ .Values.serviceMonitor.argoRollout.interval }} + {{- end }} +{{- if .Values.serviceMonitor.argoRollout.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.serviceMonitor.argoRollout.metricRelabelings | indent 6) . }} +{{- end }} +{{- if .Values.serviceMonitor.argoRollout.relabelings }} + relabelings: +{{ toYaml .Values.serviceMonitor.argoRollout.relabelings | indent 6 }} +{{- end }} \ No newline at end of file diff --git a/lma-addons/values.yaml b/lma-addons/values.yaml index b1e115cb..5421764c 100644 --- a/lma-addons/values.yaml +++ b/lma-addons/values.yaml @@ -58,6 +58,13 @@ serviceMonitor: metricRelabelings: [] relabelings: [] + argoRollout: + enabled: false + targetNamespace: taco-system + # interval: "30s" + metricRelabelings: [] + relabelings: [] + argocd: enabled: false ### interval for scrape