Skip to content

Commit

Permalink
Merge pull request #484 from ishuar/feat/allow-relabeling-on-servicem…
Browse files Browse the repository at this point in the history
…onitor

[velero]: feature to allow relabelings in `serviceMonitor`
  • Loading branch information
qiuming-best authored Aug 7, 2023
2 parents a9dac3e + 42cd48d commit 7d95633
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/velero/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: 1.11.1
kubeVersion: ">=1.16.0-0"
description: A Helm chart for velero
name: velero
version: 4.2.0
version: 4.3.0
home: https://github.com/vmware-tanzu/velero
icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png
sources:
Expand Down
6 changes: 6 additions & 0 deletions charts/velero/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ spec:
{{- if .Values.metrics.serviceMonitor.scheme }}
scheme: {{ .Values.metrics.serviceMonitor.scheme }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- toYaml .Values.metrics.serviceMonitor.metricRelabelings | nindent 6 }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.relabelings }}
relabelings: {{ toYaml .Values.metrics.serviceMonitor.relabelings | nindent 6 }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.tlsConfig }}
tlsConfig:
{{- toYaml .Values.metrics.serviceMonitor.tlsConfig | nindent 6 }}
Expand Down
6 changes: 6 additions & 0 deletions charts/velero/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ metrics:
enabled: false
annotations: {}
additionalLabels: {}

# metrics.serviceMonitor.metricRelabelings Specify Metric Relabelings to add to the scrape endpoint
# ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
# metricRelabelings: []
# metrics.serviceMonitor.relabelings [array] Prometheus relabeling rules
# relabelings: []
# ServiceMonitor namespace. Default to Velero namespace.
# namespace:
# ServiceMonitor connection scheme. Defaults to HTTP.
Expand Down

0 comments on commit 7d95633

Please sign in to comment.