Skip to content

Commit

Permalink
[prometheus-pushgateway] Support dual stack clusters (#4424)
Browse files Browse the repository at this point in the history
* feat: add support for dual stack clusters

Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr>

* fix: reuse code from node-exporter chart

Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr>

* Update charts/prometheus-pushgateway/templates/service.yaml

Co-authored-by: zeritti <47476160+zeritti@users.noreply.github.com>
Signed-off-by: Ludovic Ortega <mastership@hotmail.fr>

---------

Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr>
Signed-off-by: Ludovic Ortega <mastership@hotmail.fr>
Co-authored-by: zeritti <47476160+zeritti@users.noreply.github.com>
  • Loading branch information
M0NsTeRRR and zeritti committed Apr 6, 2024
1 parent 32d9b2e commit 8367609
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prometheus-pushgateway/Chart.yaml
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "v1.7.0"
description: A Helm chart for prometheus pushgateway
name: prometheus-pushgateway
version: 2.8.0
version: 2.9.0
home: https://github.com/prometheus/pushgateway
sources:
- https://github.com/prometheus/pushgateway
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus-pushgateway/templates/service.yaml
Expand Up @@ -19,6 +19,10 @@ spec:
{{ else if and .Values.runAsStatefulSet (not (has .Values.service.type $stsNoHeadlessSvcTypes)) }}
clusterIP: None # Headless service
{{- end }}
{{- if .Values.service.ipDualStack.enabled }}
ipFamilies: {{ toYaml .Values.service.ipDualStack.ipFamilies | nindent 4 }}
ipFamilyPolicy: {{ .Values.service.ipDualStack.ipFamilyPolicy }}
{{- end }}
type: {{ .Values.service.type }}
{{- with .Values.service.loadBalancerIP }}
loadBalancerIP: {{ . }}
Expand Down
5 changes: 5 additions & 0 deletions charts/prometheus-pushgateway/values.yaml
Expand Up @@ -29,6 +29,11 @@ service:
# Optional - Can be used for headless if value is "None"
clusterIP: ""

ipDualStack:
enabled: false
ipFamilies: ["IPv6", "IPv4"]
ipFamilyPolicy: "PreferDualStack"

loadBalancerIP: ""
loadBalancerSourceRanges: []

Expand Down

0 comments on commit 8367609

Please sign in to comment.