From 88a326bacdffde9e065b08ba893a17149584e72e Mon Sep 17 00:00:00 2001 From: Saumit Date: Sat, 11 Oct 2025 02:34:38 +0530 Subject: platform: Adding argocd helm chart --- .../templates/redis-haproxy-servicemonitor.yaml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 astroshop-platform/argocd-helmchart/charts/redis-ha/templates/redis-haproxy-servicemonitor.yaml (limited to 'astroshop-platform/argocd-helmchart/charts/redis-ha/templates/redis-haproxy-servicemonitor.yaml') diff --git a/astroshop-platform/argocd-helmchart/charts/redis-ha/templates/redis-haproxy-servicemonitor.yaml b/astroshop-platform/argocd-helmchart/charts/redis-ha/templates/redis-haproxy-servicemonitor.yaml new file mode 100644 index 0000000..188eac0 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/charts/redis-ha/templates/redis-haproxy-servicemonitor.yaml @@ -0,0 +1,39 @@ +{{- if and ( or .Values.haproxy.metrics.serviceMonitor.disableAPICheck ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ) ( .Values.haproxy.metrics.serviceMonitor.enabled ) ( .Values.haproxy.metrics.enabled ) }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "redis-ha.fullname" . }}-haproxy + namespace: {{ .Values.haproxy.metrics.serviceMonitor.namespace | default .Release.Namespace | quote }} + labels: +{{ include "labels.standard" . | indent 4 }} + {{- range $key, $value := .Values.extraLabels }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- range $key, $value := .Values.haproxy.metrics.serviceMonitor.labels }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + endpoints: + - targetPort: {{ .Values.haproxy.metrics.port }} +{{- if .Values.haproxy.metrics.serviceMonitor.interval }} + interval: {{ .Values.haproxy.metrics.serviceMonitor.interval }} +{{- end }} +{{- if .Values.haproxy.metrics.serviceMonitor.telemetryPath }} + path: {{ .Values.haproxy.metrics.serviceMonitor.telemetryPath }} +{{- end }} +{{- if .Values.haproxy.metrics.serviceMonitor.timeout }} + scrapeTimeout: {{ .Values.haproxy.metrics.serviceMonitor.timeout }} +{{- end }} +{{- with .Values.haproxy.metrics.serviceMonitor.endpointAdditionalProperties }} +{{- toYaml . | nindent 4 }} +{{- end }} + jobLabel: {{ template "redis-ha.fullname" . }}-haproxy + namespaceSelector: + matchNames: + - {{ .Release.Namespace | quote }} + selector: + matchLabels: + app: {{ template "redis-ha.name" . }} + release: {{ .Release.Name }} + component: {{ template "redis-ha.fullname" . }}-haproxy +{{- end }} -- cgit v1.2.3