Skip to content

Commit

Permalink
fix: fix templating of the metricRelabelings parameter (#615)
Browse files Browse the repository at this point in the history
Co-authored-by: Katlinsky, Ilya <[email protected]>
  • Loading branch information
ikatlinsky and ikatlinski authored Sep 15, 2023
1 parent da5b313 commit de71a62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ spec:
{{- if .Values.serviceMonitor.interval }}
interval: {{ .Values.serviceMonitor.interval }}
{{- end }}
metricRelabelings: {{ .Values.serviceMonitor.metricRelabelings }}
{{- with .Values.serviceMonitor.metricRelabelings }}
metricRelabelings: {{ toYaml . | nindent 6 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ template "apisix-ingress-controller.namespace" . }}
Expand Down
4 changes: 3 additions & 1 deletion charts/apisix/templates/service-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@ spec:
targetPort: prometheus
path: {{ .Values.serviceMonitor.path }}
interval: {{ .Values.serviceMonitor.interval }}
metricRelabelings: {{ .Values.serviceMonitor.metricRelabelings }}
{{- with .Values.serviceMonitor.metricRelabelings }}
metricRelabelings: {{ toYaml . | nindent 6 }}
{{- end }}
{{- end }}

0 comments on commit de71a62

Please sign in to comment.