From ccd6bcef75a047136dfd9d78e4866305dcdc186f Mon Sep 17 00:00:00 2001 From: Ludovic Ortega Date: Sat, 6 Apr 2024 17:59:17 +0200 Subject: [PATCH] feat: add support for dual stack clusters Signed-off-by: Ludovic Ortega --- charts/k8up/README.md | 2 ++ charts/k8up/templates/service.yaml | 6 ++++++ charts/k8up/values.yaml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/charts/k8up/README.md b/charts/k8up/README.md index bf7e622f2..dfabe1713 100644 --- a/charts/k8up/README.md +++ b/charts/k8up/README.md @@ -69,6 +69,8 @@ Document your changes in values.yaml and let `make docs:helm` generate this sect | metrics.prometheusRule.jobFailedRulesFor | list | `["archive","backup","check","prune","restore"]` | Create default rules for the given job types. Valid values are "archive", "backup", "check", "prune", and "restore". | | metrics.prometheusRule.namespace | string | `""` | If the object should be installed in a different namespace than operator | | metrics.service.annotations | object | `{}` | Annotations to add to the service | +| metrics.service.ipFamilies | list | `[]` | Sets the families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6. | +| metrics.service.ipFamilyPolicy | string | `""` | Set the ip family policy to configure dual-stack see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) | | metrics.service.nodePort | int | `0` | Service node port of the metrics endpoint, requires `metrics.service.type=NodePort` | | metrics.service.port | int | `8080` | | | metrics.service.type | string | `"ClusterIP"` | | diff --git a/charts/k8up/templates/service.yaml b/charts/k8up/templates/service.yaml index 4f44cd021..23a0670dd 100644 --- a/charts/k8up/templates/service.yaml +++ b/charts/k8up/templates/service.yaml @@ -10,6 +10,12 @@ metadata: {{- end }} spec: type: {{ .Values.metrics.service.type }} + {{- if .Values.metrics.service.ipFamilyPolicy }} + ipFamilyPolicy: {{ .Values.metrics.service.ipFamilyPolicy }} + {{- end }} + {{- if .Values.metrics.service.ipFamilies }} + ipFamilies: {{ .Values.metrics.service.ipFamilies | toYaml | nindent 2 }} + {{- end }} ports: - name: http port: {{ .Values.metrics.service.port }} diff --git a/charts/k8up/values.yaml b/charts/k8up/values.yaml index 47e18e1de..6ae09096b 100644 --- a/charts/k8up/values.yaml +++ b/charts/k8up/values.yaml @@ -90,6 +90,10 @@ metrics: service: port: 8080 type: ClusterIP + # -- Set the ip family policy to configure dual-stack see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) + ipFamilyPolicy: "" + # -- Sets the families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6. + ipFamilies: [] # -- Service node port of the metrics endpoint, requires `metrics.service.type=NodePort` nodePort: 0 # -- Annotations to add to the service