diff --git a/charts/velero/templates/servicemonitor.yaml b/charts/velero/templates/servicemonitor.yaml index e3ccfa40..777ff9f1 100644 --- a/charts/velero/templates/servicemonitor.yaml +++ b/charts/velero/templates/servicemonitor.yaml @@ -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 }} diff --git a/charts/velero/values.yaml b/charts/velero/values.yaml index 4e08c915..6de0e457 100644 --- a/charts/velero/values.yaml +++ b/charts/velero/values.yaml @@ -186,6 +186,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.