Skip to content

Commit

Permalink
add service monitoring to errbot and update image link
Browse files Browse the repository at this point in the history
  • Loading branch information
Hritik Batra committed Sep 18, 2024
1 parent 154cf41 commit 101fadc
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
32 changes: 32 additions & 0 deletions argocd-helm-charts/errbot/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Docs:
# https://docs.openshift.com/container-platform/4.12/rest_api/monitoring_apis/servicemonitor-monitoring-coreos-com-v1.html
# https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/running-exporters.md

{{- if .Values.serviceMonitor.enabled }}

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ .Values.appName }}
labels:
app: {{ .Values.appName }}
{{- with .Values.serviceMonitor.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
app: {{ .Values.appName }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
endpoints:
- port: http
{{- if .Values.serviceMonitor.interval }}
interval: {{ .Values.serviceMonitor.interval }}
{{- end }}
{{- if .Values.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
{{- end }}

{{- end }}
8 changes: 7 additions & 1 deletion argocd-helm-charts/errbot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ additionalLabels:
# l2: val2

image:
repository: registry.obmondo.com/obmondo/dockerfiles/errbot
repository: harbor.obmondo.com/obmondo/errbot
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "6.1.10"
Expand Down Expand Up @@ -63,3 +63,9 @@ env:
value: "test-team"
- name: BOT_ADMINS
value: "@admin,@anotheradmin"

serviceMonitor:
enabled: false
# additionalLabels: {}
# interval: ""
# scrapeTimeout: ""

0 comments on commit 101fadc

Please sign in to comment.