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

Improve runner service monitor in order to be more configurable #1150

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
21 changes: 19 additions & 2 deletions helm/robusta/templates/runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,29 @@ metadata:
name: robusta-runner-service-monitor
labels:
# this label is how the Prometheus installed with Robusta finds ServiceMonitors
# TODO: we probably need to add custom labels here for a Prometheus installed separately
release: {{ .Release.Name }}
{{- with .Values.runner.serviceMonitor.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- path: /metrics
- path: {{ .Values.runner.serviceMonitor.path }}
port: http
{{- if .Values.runner.serviceMonitor.interval }}
interval: {{ .Values.runner.serviceMonitor.interval }}
{{- end }}
{{- if .Values.runner.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.runner.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if .Values.runner.serviceMonitor.relabelings }}
relabelings: {{- tpl (toYaml .Values.runner.serviceMonitor.relabelings) . | nindent 8 }}
{{- end }}
{{- if .Values.runner.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- tpl (toYaml .Values.runner.serviceMonitor.metricRelabelings) . | nindent 8 }}
{{- end }}
{{- if .Values.runner.serviceMonitor.honorLabels }}
honorLabels: {{ .Values.runner.serviceMonitor.honorLabels }}
{{- end }}
selector:
matchLabels:
app: {{ .Release.Name }}-runner
Expand Down
2 changes: 2 additions & 0 deletions helm/robusta/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,8 @@ runner:
imagePullSecrets: []
extraVolumes: []
extraVolumeMounts: []
serviceMonitor:
path: /metrics

kube-prometheus-stack:
alertmanager:
Expand Down
Loading