Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

Prom metrics #49

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog
#
## 0.2.6 October 22, 2019
- Add a prometheus exporter sidecar

## 0.2.5: August 30, 2019
- __Potentially breaking__: Add release namespace to all resources to work with `helm template`
See https://github.com/helm/helm/issues/5465 for more information.
Expand Down
2 changes: 1 addition & 1 deletion stable/eventstore/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
description: A Helm chart for Kubernetes EventStore.
name: eventstore
home: https://eventstore.org/
version: 0.2.5
version: 0.2.6
appVersion: 4.1.1-hotfix1
keywords:
- eventstore
Expand Down
25 changes: 21 additions & 4 deletions stable/eventstore/templates/eventstore-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ spec:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/eventstore-configmap.yaml") . | sha256sum }}
{{- if .Values.metrics.enabled }}
prometheus.io/scrape: "true"
prometheus.io/port: {{ .Values.metrics.port | quote }}
{{- end }}
{{- if .Values.podAnnotations }}
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ include "eventstore.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: database
{{- if .Values.podAnnotations }}
annotations:
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
spec:
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
Expand All @@ -44,6 +47,20 @@ spec:
{{- end}}
{{- end }}
containers:
{{- if .Values.metrics.enabled }}
- name: prometheus-exporter
image: marcinbudny/eventstore_exporter:0.7.0
imagePullPolicy: {{ .Values.imagePullPolicy }}
env:
- name: EVENTSTORE_USER
value: admin
- name: EVENTSTORE_PASSWORD
value: {{- if .Values.admin.password }} {{- .Values.admin.password }} {{- else }} changeit {{- end }}
- name: PORT
value: {{ .Values.metrics.port | quote }}
- name: CLUSTER_MODE
value: {{- if and .Values.extIp (gt (.Values.clusterSize | float64) 1.0) }} cluster {{- else }} single {{- end }}
{{- end }}
- name: {{ .Chart.Name }}
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
imagePullPolicy: {{ .Values.imagePullPolicy }}
Expand Down
6 changes: 6 additions & 0 deletions stable/eventstore/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ persistence:
mountPath: /var/lib/eventstore
annotations: {}

## Export prometheus metrics
metrics:
enabled: false
## The port the exporter sidecar will expose its metrics on
port: 9448

resources: {}
## If you want to specify resources, uncomment the following
## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
Expand Down