From c110d54a96ead63e69a27ceefdeaec2660d9a959 Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Thu, 20 Feb 2025 10:53:11 +0100 Subject: [PATCH 1/5] feat: Allow configuring the Service IP Family policy to make it dual-stack Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services Signed-off-by: Armel Soro --- charts/backstage/templates/service.yaml | 7 +++++++ charts/backstage/values.yaml | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/charts/backstage/templates/service.yaml b/charts/backstage/templates/service.yaml index 69554a3..1720b78 100644 --- a/charts/backstage/templates/service.yaml +++ b/charts/backstage/templates/service.yaml @@ -34,6 +34,13 @@ spec: {{- if .Values.service.sessionAffinity }} sessionAffinity: {{ .Values.service.sessionAffinity }} {{- end }} + {{- if .Values.service.ipFamilyPolicy }} + ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }} + {{- end }} + {{- with .Values.service.ipFamilies }} + ipFamilies: + {{- toYaml . | nindent 4 }} + {{- end }} ports: - name: {{ .Values.service.ports.name }} port: {{ .Values.service.ports.backend }} diff --git a/charts/backstage/values.yaml b/charts/backstage/values.yaml index a57534d..d25755b 100644 --- a/charts/backstage/values.yaml +++ b/charts/backstage/values.yaml @@ -352,6 +352,16 @@ service: # -- Extra ports to expose in the Backstage service (normally used with the `sidecar` value) extraPorts: [] + # -- IP Family Policy + # + #
Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack + ipFamilyPolicy: "" + + # -- IP Families + # + #
Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack + ipFamilies: [] + ## @section NetworkPolicy parameters ## networkPolicy: From 795b14dc2346b370246acca37ff0b0d87af905fc Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Thu, 20 Feb 2025 10:57:31 +0100 Subject: [PATCH 2/5] Bump the Chart version Signed-off-by: Armel Soro --- charts/backstage/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/backstage/Chart.yaml b/charts/backstage/Chart.yaml index 7b5355b..65af936 100644 --- a/charts/backstage/Chart.yaml +++ b/charts/backstage/Chart.yaml @@ -38,4 +38,4 @@ sources: # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.3.1 +version: 2.4.0 From bb9861755584fa89c53fec21f51a2a587debe8b1 Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Thu, 20 Feb 2025 10:58:05 +0100 Subject: [PATCH 3/5] Update values schema Signed-off-by: Armel Soro --- charts/backstage/values.schema.json | 25 ++++++++++++++++++++++++ charts/backstage/values.schema.tmpl.json | 22 +++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/charts/backstage/values.schema.json b/charts/backstage/values.schema.json index 9ed52bc..56e66be 100644 --- a/charts/backstage/values.schema.json +++ b/charts/backstage/values.schema.json @@ -7051,6 +7051,31 @@ "title": "Extra ports to expose in the Backstage service", "type": "array" }, + "ipFamilies": { + "default": [], + "description": "Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "items": { + "enum": [ + "IPv4", + "IPv6" + ], + "type": "string" + }, + "title": "Backstage service IP families", + "type": "array" + }, + "ipFamilyPolicy": { + "default": "", + "description": "Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "enum": [ + "", + "SingleStack", + "PreferDualStack", + "RequireDualStack" + ], + "title": "Backstage service IP family policy", + "type": "string" + }, "loadBalancerIP": { "default": "", "description": "Ref: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer", diff --git a/charts/backstage/values.schema.tmpl.json b/charts/backstage/values.schema.tmpl.json index e365b96..3764480 100644 --- a/charts/backstage/values.schema.tmpl.json +++ b/charts/backstage/values.schema.tmpl.json @@ -730,6 +730,28 @@ "type": "object" }, "default": [] + }, + "ipFamilyPolicy": { + "title": "Backstage service IP family policy", + "description": "Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "string", + "default": "", + "enum": [ + "", + "SingleStack", + "PreferDualStack", + "RequireDualStack" + ] + }, + "ipFamilies": { + "title": "Backstage service IP families", + "description": "Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services", + "type": "array", + "items": { + "type": "string", + "enum": ["IPv4", "IPv6"] + }, + "default": [] } } }, From 76f99875fe029708e965bde65c9757fc24abe16c Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Thu, 20 Feb 2025 10:58:38 +0100 Subject: [PATCH 4/5] Add test values file for CI Signed-off-by: Armel Soro --- charts/backstage/ci/service-dualstack-ip-family-values.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 charts/backstage/ci/service-dualstack-ip-family-values.yaml diff --git a/charts/backstage/ci/service-dualstack-ip-family-values.yaml b/charts/backstage/ci/service-dualstack-ip-family-values.yaml new file mode 100644 index 0000000..7778deb --- /dev/null +++ b/charts/backstage/ci/service-dualstack-ip-family-values.yaml @@ -0,0 +1,4 @@ +service: + ipFamilyPolicy: PreferDualStack + ipFamilies: + - IPv4 From 006e28dc7aba5c396d8827487532a7ea3fabf03b Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Thu, 20 Feb 2025 11:01:26 +0100 Subject: [PATCH 5/5] Run pre-commit hooks Signed-off-by: Armel Soro --- README.md | 2 +- charts/backstage/README.md | 6 ++++-- charts/backstage/README.md.gotmpl | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 20ff735..748806b 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Backstage unifies all your infrastructure tooling, services, and documentation t This chart focuses on providing users the same experience and functionality no matter what flavor of Kubernetes they use. This chart will support only patterns that are either customary for all Kubernetes flavors, are commonly used in the Bitnami charts ecosystem, and recognized as Backstage official patterns. -We welcome other, more specialized, charts to use this cannonical chart as a direct dependency, expanding the feature set further, beyond this scope. +We welcome other, more specialized, charts to use this canonical chart as a direct dependency, expanding the feature set further, beyond this scope. A list of derived charts: - OpenShift specialized chart: [Red Hat Developer Hub Helm chart](https://github.com/redhat-developer/rhdh-chart/tree/main/charts/backstage) diff --git a/charts/backstage/README.md b/charts/backstage/README.md index 77ec65f..0fffacb 100644 --- a/charts/backstage/README.md +++ b/charts/backstage/README.md @@ -2,7 +2,7 @@ # Backstage Helm Chart [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/backstage)](https://artifacthub.io/packages/search?repo=backstage) -![Version: 2.3.1](https://img.shields.io/badge/Version-2.3.1-informational?style=flat-square) +![Version: 2.4.0](https://img.shields.io/badge/Version-2.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) A Helm chart for deploying a Backstage application @@ -51,7 +51,7 @@ This chart bootstraps a [Backstage](https://backstage.io/docs/deployment/docker) This chart focuses on providing users the same experience and functionality no matter what flavor of Kubernetes they use. This chart will support only patterns that are either customary for all Kubernetes flavors, are commonly used in the Bitnami charts ecosystem, and recognized as Backstage official patterns. -We welcome other, more specialized, charts to use this cannonical chart as a direct dependency, expanding the feature set further, beyond this scope. +We welcome other, more specialized, charts to use this canonical chart as a direct dependency, expanding the feature set further, beyond this scope. A list of derived charts: - OpenShift specialized chart: [Janus Backstage Helm chart](https://github.com/janus-idp/helm-backstage/tree/main/charts/backstage) @@ -204,6 +204,8 @@ Kubernetes: `>= 1.19.0-0` | service.clusterIP | Backstage service Cluster IP
E.g `clusterIP: None` | string | `""` | | service.externalTrafficPolicy | Backstage service external traffic policy Ref: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip | string | `"Cluster"` | | service.extraPorts | Extra ports to expose in the Backstage service (normally used with the `sidecar` value) | list | `[]` | +| service.ipFamilies | IP Families
Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack | list | `[]` | +| service.ipFamilyPolicy | IP Family Policy
Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack | string | `""` | | service.loadBalancerIP | Backstage service Load Balancer IP
Ref: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer | string | `""` | | service.loadBalancerSourceRanges | Load Balancer sources
Ref: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
E.g `loadBalancerSourceRanges: [10.10.10.0/24]` | list | `[]` | | service.nodePorts | Node port for the Backstage client connections Choose port between `30000-32767` | object | `{"backend":""}` | diff --git a/charts/backstage/README.md.gotmpl b/charts/backstage/README.md.gotmpl index 0340738..7c26da3 100644 --- a/charts/backstage/README.md.gotmpl +++ b/charts/backstage/README.md.gotmpl @@ -45,7 +45,7 @@ This chart bootstraps a [Backstage](https://backstage.io/docs/deployment/docker) This chart focuses on providing users the same experience and functionality no matter what flavor of Kubernetes they use. This chart will support only patterns that are either customary for all Kubernetes flavors, are commonly used in the Bitnami charts ecosystem, and recognized as Backstage official patterns. -We welcome other, more specialized, charts to use this cannonical chart as a direct dependency, expanding the feature set further, beyond this scope. +We welcome other, more specialized, charts to use this canonical chart as a direct dependency, expanding the feature set further, beyond this scope. A list of derived charts: - OpenShift specialized chart: [Janus Backstage Helm chart](https://github.com/janus-idp/helm-backstage/tree/main/charts/backstage)