From 586e38248210be50392b9d90a96c10c3f78798ec Mon Sep 17 00:00:00 2001 From: Sergio Borges <58406644+sc2borges@users.noreply.github.com> Date: Sun, 23 Feb 2020 02:14:47 +1100 Subject: [PATCH] [stable/prometheus-operator]Moving out PrometheusSpec.portName from range loop to Global Scope. (#20495) * Update Prometheus-operator for accept prometheusSpec.portName to Global Scope and Chart Version Signed-off-by: Sergio Borges * Changing the variable field to use the global $ scope context Signed-off-by: Sergio Borges * Update the Chart Version Signed-off-by: Sergio Borges * Bumps the Chart version to 8.9.1 Signed-off-by: Sergio Borges * Bump the Chart Version Signed-off-by: Sergio Borges Signed-off-by: Miguel Mingorance --- stable/prometheus-operator/Chart.yaml | 2 +- .../templates/prometheus/serviceperreplica.yaml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/stable/prometheus-operator/Chart.yaml b/stable/prometheus-operator/Chart.yaml index 4485001dfdb8..a6df8ea49846 100644 --- a/stable/prometheus-operator/Chart.yaml +++ b/stable/prometheus-operator/Chart.yaml @@ -12,7 +12,7 @@ sources: - https://github.com/coreos/kube-prometheus - https://github.com/coreos/prometheus-operator - https://coreos.com/operators/prometheus -version: 8.9.1 +version: 8.9.2 appVersion: 0.36.0 tillerVersion: ">=2.12.0" home: https://github.com/coreos/prometheus-operator diff --git a/stable/prometheus-operator/templates/prometheus/serviceperreplica.yaml b/stable/prometheus-operator/templates/prometheus/serviceperreplica.yaml index b5da0fa697e1..a57c0b2db37f 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 -}} +{{- $serviceValues := .Values.prometheus.servicePerReplica -}} apiVersion: v1 kind: List 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 }}