Skip to content

Commit

Permalink
Merge pull request #117 from BedrockStreaming/fix/monitor-labels
Browse files Browse the repository at this point in the history
fix(helm): match service label with monitor selectorLabels
  • Loading branch information
Yokann authored Jan 30, 2024
2 parents 25e2319 + f196a22 commit 2413e0d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions helm/prescaling-exporter/templates/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ spec:
matchLabels:
app: {{ template "prescaling-exporter.name" . }}
release: {{ .Release.Name }}
{{- if .Values.prometheus.monitor.additionalSelectorLabels }}
{{- toYaml .Values.prometheus.monitor.additionalSelectorLabels | nindent 6 }}
{{- if .Values.service.additionalLabels }}
{{- toYaml .Values.service.additionalLabels | nindent 6 }}
{{- end }}
endpoints:
- port: metrics
Expand Down Expand Up @@ -52,7 +52,7 @@ spec:
selector:
matchLabels:
{{- include "prescaling-exporter.selectorLabels" . | nindent 8 }}
{{- if .Values.victoriametrics.monitor.additionalSelectorLabels }}
{{- toYaml .Values.victoriametrics.monitor.additionalSelectorLabels | nindent 8 }}
{{- if .Values.service.additionalLabels }}
{{- toYaml .Values.service.additionalLabels | nindent 8 }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions helm/prescaling-exporter/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ metadata:
name: {{ include "prescaling-exporter.fullname" . }}
labels:
{{- include "prescaling-exporter.labels" . | nindent 4 }}
{{- if .Values.service.additionalLabels }}
{{- toYaml .Values.service.additionalLabels | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
Expand Down
1 change: 1 addition & 0 deletions helm/prescaling-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ securityContext: {}
service:
type: ClusterIP
port: 9101
additionalLabels: {}

ingress:
enabled: false
Expand Down
2 changes: 0 additions & 2 deletions helm/test-values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ prometheus:
monitor:
enabled: false
additionalLabels: {}
additionalSelectorLabels: {}
relabelings:
- action: replace
regex: (.*)
Expand All @@ -28,7 +27,6 @@ victoriametrics:
monitor:
enabled: true
additionalLabels: {}
additionalSelectorLabels: {}
relabelings:
- action: replace
regex: (.*)
Expand Down

0 comments on commit 2413e0d

Please sign in to comment.