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

Support metrics relabelings in service monitor #10095

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions helm/nessie/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ spec:
interval: {{ .Values.serviceMonitor.interval }}
{{- end }}
path: /q/metrics
{{- with .Values.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
Expand Down
2 changes: 2 additions & 0 deletions helm/nessie/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,8 @@ serviceMonitor:
labels:
{}
# release: prometheus
# -- Relabeling rules to apply to metrics. Ref https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config.
metricRelabelings: []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add an example here to help users understand the syntax:

Suggested change
metricRelabelings: []
metricRelabelings: []
# - source_labels: [ __meta_kubernetes_namespace ]
# separator: ;
# regex: (.*)
# target_label: namespace
# replacement: $1
# action: replace


serviceAccount:
# -- Specifies whether a service account should be created.
Expand Down