Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add optional serviceMonitor field for SFTD chart #3770

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions changelog.d/2-features/sft-chart-service-monitor
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[SFT chart] Add option to enable serviceMonitor to scrape prometheus metrics
15 changes: 15 additions & 0 deletions charts/sftd/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if .Values.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "sftd.fullname" . }}
labels:
{{- include "sftd.labels" . | nindent 4 }}
spec:
endpoints:
- port: metrics
path: /metrics
selector:
matchLabels:
{{- include "sftd.selectorLabels" . | nindent 6 }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/sftd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

metrics:
serviceMonitor:
enabled: false

# The time to wait after terminating an sft node before shutting it down. No
# new calls will be initiated whilst a pod is being terminated.
terminationGracePeriodSeconds: 10
Expand Down