Skip to content

Commit

Permalink
feat: Adding service monitor to helm chart (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfuelsh authored Sep 17, 2024
1 parent d6897b5 commit 3bd3080
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion helm/fuel-explorer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.11
version: 0.1.12

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
15 changes: 15 additions & 0 deletions helm/fuel-explorer/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if .Values.app.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "fuel-explorer.fullname" . }}
labels:
release: {{ .Values.app.serviceMonitor.prometheusRelease }}
spec:
selector:
matchLabels:
{{- include "fuel-explorer.labels" . | nindent 4 }}
endpoints:
- path: /metrics
port: http
{{- end }}
5 changes: 5 additions & 0 deletions helm/fuel-explorer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,8 @@ nodeSelector: {}
tolerations: []

affinity: {}

app:
serviceMonitor:
enabled: true
prometheusRelease: kube-prometheus

0 comments on commit 3bd3080

Please sign in to comment.