Skip to content

Commit

Permalink
Merge pull request #116 from BedrockStreaming/feat/add-monitor-custom…
Browse files Browse the repository at this point in the history
…-selector-labels

feat(helm): add custom selector labels on ServiceMonitor
  • Loading branch information
Yokann authored Jan 26, 2024
2 parents 9ba8a11 + 65a948a commit 9388af0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions helm/prescaling-exporter/templates/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ spec:
matchLabels:
app: {{ template "prescaling-exporter.name" . }}
release: {{ .Release.Name }}
{{- if .Values.prometheus.monitor.additionalSelectorLabels }}
{{- toYaml .Values.prometheus.monitor.additionalSelectorLabels | nindent 6 }}
{{- end }}
endpoints:
- port: metrics
{{- if .Values.prometheus.monitor.scrapeTimeout }}
Expand Down Expand Up @@ -49,4 +52,7 @@ spec:
selector:
matchLabels:
{{- include "prescaling-exporter.selectorLabels" . | nindent 8 }}
{{- if .Values.victoriametrics.monitor.additionalSelectorLabels }}
{{- toYaml .Values.victoriametrics.monitor.additionalSelectorLabels | nindent 8 }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions helm/test-values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ prometheus:
monitor:
enabled: false
additionalLabels: {}
additionalSelectorLabels: {}
relabelings:
- action: replace
regex: (.*)
Expand All @@ -27,6 +28,7 @@ victoriametrics:
monitor:
enabled: true
additionalLabels: {}
additionalSelectorLabels: {}
relabelings:
- action: replace
regex: (.*)
Expand Down

0 comments on commit 9388af0

Please sign in to comment.