summaryrefslogtreecommitdiff
path: root/astroshop-platform/argocd-helmchart/templates/argocd-repo-server/servicemonitor.yaml
diff options
context:
space:
mode:
authorSaumit <justsaumit@protonmail.com>2025-10-11 02:34:38 +0530
committerSaumit <justsaumit@protonmail.com>2025-10-11 02:34:38 +0530
commit88a326bacdffde9e065b08ba893a17149584e72e (patch)
tree20e380438497afb8c4b33a932505602590721690 /astroshop-platform/argocd-helmchart/templates/argocd-repo-server/servicemonitor.yaml
parentef773bd27019ec6597bd12237e3b4f4f0f46f244 (diff)
platform: Adding argocd helm chart
Diffstat (limited to 'astroshop-platform/argocd-helmchart/templates/argocd-repo-server/servicemonitor.yaml')
-rw-r--r--astroshop-platform/argocd-helmchart/templates/argocd-repo-server/servicemonitor.yaml51
1 files changed, 51 insertions, 0 deletions
diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-repo-server/servicemonitor.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-repo-server/servicemonitor.yaml
new file mode 100644
index 0000000..3d7cc49
--- /dev/null
+++ b/astroshop-platform/argocd-helmchart/templates/argocd-repo-server/servicemonitor.yaml
@@ -0,0 +1,51 @@
+{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.repoServer.metrics.enabled .Values.repoServer.metrics.serviceMonitor.enabled }}
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+ name: {{ template "argo-cd.repoServer.fullname" . }}
+ namespace: {{ default (include "argo-cd.namespace" .) .Values.repoServer.metrics.serviceMonitor.namespace | quote }}
+ labels:
+ {{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 4 }}
+ {{- with .Values.repoServer.metrics.serviceMonitor.selector }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- with .Values.repoServer.metrics.serviceMonitor.additionalLabels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- with .Values.repoServer.metrics.serviceMonitor.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ endpoints:
+ - port: {{ .Values.repoServer.metrics.service.portName }}
+ {{- with .Values.repoServer.metrics.serviceMonitor.interval }}
+ interval: {{ . }}
+ {{- end }}
+ {{- with .Values.repoServer.metrics.serviceMonitor.scrapeTimeout }}
+ scrapeTimeout: {{ . }}
+ {{- end }}
+ path: /metrics
+ {{- with .Values.repoServer.metrics.serviceMonitor.relabelings }}
+ relabelings:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.repoServer.metrics.serviceMonitor.metricRelabelings }}
+ metricRelabelings:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ honorLabels: {{ .Values.repoServer.metrics.serviceMonitor.honorLabels }}
+ {{- with .Values.repoServer.metrics.serviceMonitor.scheme }}
+ scheme: {{ . }}
+ {{- end }}
+ {{- with .Values.repoServer.metrics.serviceMonitor.tlsConfig }}
+ tlsConfig:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ namespaceSelector:
+ matchNames:
+ - {{ include "argo-cd.namespace" . }}
+ selector:
+ matchLabels:
+ {{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.repoServer.name "name" (printf "%s-metrics" .Values.repoServer.name)) | nindent 6 }}
+{{- end }}