diff --git a/public/index.yaml b/public/index.yaml index 724e7d3..3c9a9c1 100644 --- a/public/index.yaml +++ b/public/index.yaml @@ -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 @@ -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: @@ -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 @@ -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" diff --git a/public/n8n-0.12.1.tgz b/public/n8n-0.12.1.tgz index a052071..a49069b 100644 Binary files a/public/n8n-0.12.1.tgz and b/public/n8n-0.12.1.tgz differ diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index 3539660..e88d2d6 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -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 }} {{/* diff --git a/templates/servicemonitor.yaml b/templates/servicemonitor.yaml new file mode 100644 index 0000000..fd39ed4 --- /dev/null +++ b/templates/servicemonitor.yaml @@ -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 }} diff --git a/values.yaml b/values.yaml index e01a5e6..361e8b7 100644 --- a/values.yaml +++ b/values.yaml @@ -324,3 +324,7 @@ redis: enabled: true existingClaim: "" size: 2Gi + +metrics: + enabled: false + namespace: infra-prometheus