diff --git a/stable/prometheus-operator/templates/prometheus/serviceperreplica.yaml b/stable/prometheus-operator/templates/prometheus/serviceperreplica.yaml index 4f18778a5941..2ba1edb024b4 100644 --- a/stable/prometheus-operator/templates/prometheus/serviceperreplica.yaml +++ b/stable/prometheus-operator/templates/prometheus/serviceperreplica.yaml @@ -1,7 +1,6 @@ {{- if and .Values.prometheus.enabled .Values.prometheus.servicePerReplica.enabled }} {{- $count := .Values.prometheus.prometheusSpec.replicas | int -}} {{- $serviceValues := .Values.prometheus.servicePerReplica -}} -{{- $portName := .Values.prometheus.prometheusSpec.portName -}} apiVersion: v1 kind: ServiceList metadata: @@ -32,7 +31,7 @@ items: {{- end }} {{- end }} ports: - - name: {{ $portName }} + - name: {{ $.Values.prometheus.prometheusSpec.portName }} {{- if eq $serviceValues.type "NodePort" }} nodePort: {{ $serviceValues.nodePort }} {{- end }}