From e4e1a6bf87e904245bbf93975cdd17ed8d5ffb6c Mon Sep 17 00:00:00 2001 From: Isaac Nickaein Date: Wed, 5 Jun 2024 23:00:23 +0330 Subject: [PATCH] [prometheus-pushgateway] allow overriding service port name (#4583) * allow overriding service port name Signed-off-by: Isaac Nickaein * Update charts/prometheus-pushgateway/Chart.yaml Co-authored-by: zeritti <47476160+zeritti@users.noreply.github.com> Signed-off-by: Isaac Nickaein * Empty commit to invoke DCO check Signed-off-by: zeritti <47476160+zeritti@users.noreply.github.com> --------- Signed-off-by: Isaac Nickaein Signed-off-by: zeritti <47476160+zeritti@users.noreply.github.com> Co-authored-by: zeritti <47476160+zeritti@users.noreply.github.com> --- charts/prometheus-pushgateway/Chart.yaml | 2 +- charts/prometheus-pushgateway/templates/service.yaml | 2 +- charts/prometheus-pushgateway/templates/servicemonitor.yaml | 2 +- charts/prometheus-pushgateway/values.yaml | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/charts/prometheus-pushgateway/Chart.yaml b/charts/prometheus-pushgateway/Chart.yaml index 9e48152adda4..6e1b36f69bcc 100644 --- a/charts/prometheus-pushgateway/Chart.yaml +++ b/charts/prometheus-pushgateway/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "v1.8.0" description: A Helm chart for prometheus pushgateway name: prometheus-pushgateway -version: 2.12.0 +version: 2.13.0 home: https://github.com/prometheus/pushgateway sources: - https://github.com/prometheus/pushgateway diff --git a/charts/prometheus-pushgateway/templates/service.yaml b/charts/prometheus-pushgateway/templates/service.yaml index c19de4ea4984..15029f7e3025 100644 --- a/charts/prometheus-pushgateway/templates/service.yaml +++ b/charts/prometheus-pushgateway/templates/service.yaml @@ -40,6 +40,6 @@ spec: nodePort: {{ .Values.service.nodePort }} {{- end }} protocol: TCP - name: http + name: {{ .Values.service.portName }} selector: {{- include "prometheus-pushgateway.selectorLabels" . | nindent 4 }} diff --git a/charts/prometheus-pushgateway/templates/servicemonitor.yaml b/charts/prometheus-pushgateway/templates/servicemonitor.yaml index 5e3f75a11ee1..ae173199b320 100644 --- a/charts/prometheus-pushgateway/templates/servicemonitor.yaml +++ b/charts/prometheus-pushgateway/templates/servicemonitor.yaml @@ -15,7 +15,7 @@ metadata: {{- end }} spec: endpoints: - - port: http + - port: {{ .Values.service.portName }} {{- with .Values.serviceMonitor.interval }} interval: {{ . }} {{- end }} diff --git a/charts/prometheus-pushgateway/values.yaml b/charts/prometheus-pushgateway/values.yaml index 062711fb64c2..85f267fdb864 100644 --- a/charts/prometheus-pushgateway/values.yaml +++ b/charts/prometheus-pushgateway/values.yaml @@ -25,6 +25,7 @@ service: port: 9091 targetPort: 9091 # nodePort: 32100 + portName: http # Optional - Can be used for headless if value is "None" clusterIP: ""