Skip to content

Commit

Permalink
feat(monitoring): Add ServiceMonitor for prom scrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
firehist committed Sep 9, 2023
1 parent c2299e9 commit c30c552
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
8 changes: 4 additions & 4 deletions public/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ entries:
url: https://github.com/8gears/n8n-helm-chart/pull/46
apiVersion: v2
appVersion: 1.5.1
created: "2023-09-09T09:54:59.734799+02:00"
created: "2023-09-09T23:37:10.171019+02:00"
dependencies:
- condition: redis.enabled
name: redis
Expand All @@ -30,7 +30,7 @@ entries:
description: A Kubernetes Helm chart for n8n a free and open fair-code licensed
node based Workflow Automation Tool. Easily automate tasks across different
services.
digest: 7887b83c3579802af25f813331d955664f5174c792c919d46dddb410224ba1c7
digest: 22c36c8aacac074abef82c821b03f2f78b855fac71e15fbe4df9e1b0937ab98a
home: https://github.com/8gears/n8n-helm-chart
icon: https://avatars1.githubusercontent.com/u/45487711?s=200&v=4
keywords:
Expand Down Expand Up @@ -63,7 +63,7 @@ entries:
aka @swarnat\"\n url: https://github.com/swarnat\n"
apiVersion: v2
appVersion: 0.217.1
created: "2023-09-09T09:54:59.710178+02:00"
created: "2023-09-09T23:37:10.143976+02:00"
dependencies:
- condition: redis.enabled
name: redis
Expand Down Expand Up @@ -92,4 +92,4 @@ entries:
urls:
- https://elium.github.io/n8n-helm-chart/n8n-0.10.0.tgz
version: 0.10.0
generated: "2023-09-09T09:54:59.699898+02:00"
generated: "2023-09-09T23:37:10.138387+02:00"
Binary file modified public/n8n-0.12.1.tgz
Binary file not shown.
4 changes: 4 additions & 0 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ Selector labels
- name: "N8N_DISABLE_PRODUCTION_MAIN_PROCESS"
value: "true"
{{ end }}
{{- if .Values.metrics.enabled }}
- name: "N8N_METRICS"
value: "true"
{{ end }}
{{- end }}

{{/*
Expand Down
23 changes: 23 additions & 0 deletions templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{- if .Values.metrics.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
release: {{ .Values.metrics.namespace | default 'monitoring' }}
name: {{ include "n8n.fullname" . }}
labels:
{{- include "n8n.labels" . | nindent 4 }}
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- path: /metrics
port: http
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "n8n.selectorLabels" . | nindent 6 }}
{{- end }}
4 changes: 4 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,7 @@ redis:
enabled: true
existingClaim: ""
size: 2Gi

metrics:
enabled: false
namespace: infra-prometheus

0 comments on commit c30c552

Please sign in to comment.