From 5b81efa34a04ee6d04408458215c77b980392285 Mon Sep 17 00:00:00 2001 From: Baoyuan Date: Fri, 6 Nov 2026 11:28:08 +0800 Subject: [PATCH] feat(api7ee): expose Service trafficDistribution (3.9) Backport #421 to release/3.9. Bump the api7ee3 chart patch and regenerate the README for this release line. (cherry picked from commit 54e92e061208def26344083a8c7244b60527f7fa) --- charts/api7/Chart.yaml | 2 +- charts/api7/README.md | 5 ++++- charts/api7/templates/dashboard-service.yaml | 3 +++ charts/api7/templates/developer-portal-service.yaml | 3 +++ charts/api7/templates/dp-manager-service.yaml | 3 +++ charts/api7/values.yaml | 6 ++++++ 6 files changed, 20 insertions(+), 2 deletions(-) diff --git a/charts/api7/Chart.yaml b/charts/api7/Chart.yaml index f1f8374b..36b5696b 100644 --- a/charts/api7/Chart.yaml +++ b/charts/api7/Chart.yaml @@ -17,7 +17,7 @@ type: application # Versions are expected to follow Semantic Versioning (https://semver.org/) # major.minor mirrors the API7 EE release line (3.9.x), patch is this chart's # own counter on that line and is decoupled from the app patch (see appVersion). -version: 3.9.11 +version: 3.9.12 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/api7/README.md b/charts/api7/README.md index 0b5f29ed..fdf8688e 100644 --- a/charts/api7/README.md +++ b/charts/api7/README.md @@ -1,6 +1,6 @@ # api7ee3 -![Version: 3.9.11](https://img.shields.io/badge/Version-3.9.11-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.9.22](https://img.shields.io/badge/AppVersion-3.9.22-informational?style=flat-square) +![Version: 3.9.12](https://img.shields.io/badge/Version-3.9.12-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.9.22](https://img.shields.io/badge/AppVersion-3.9.22-informational?style=flat-square) A Helm chart for Kubernetes @@ -117,6 +117,7 @@ A Helm chart for Kubernetes | dashboard_service.ingress.tls | list | `[]` | | | dashboard_service.port | int | `7080` | | | dashboard_service.tlsPort | int | `7443` | | +| dashboard_service.trafficDistribution | string | `""` | Service traffic distribution preference (e.g. PreferSameZone). Empty omits the field. Supported values depend on the Kubernetes version and feature gates. | | dashboard_service.type | string | `"ClusterIP"` | | | developer_portal.extraEnvVars | list | `[]` | | | developer_portal.extraInitContainers | list | `[]` | | @@ -169,6 +170,7 @@ A Helm chart for Kubernetes | developer_portal_service.ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | | developer_portal_service.ingress.tls | list | `[]` | | | developer_portal_service.port | int | `4321` | | +| developer_portal_service.trafficDistribution | string | `""` | Service traffic distribution preference (e.g. PreferSameZone). Empty omits the field. Supported values depend on the Kubernetes version and feature gates. | | developer_portal_service.type | string | `"ClusterIP"` | | | dp_manager.extraEnvVars | list | `[]` | | | dp_manager.extraInitContainers | list | `[]` | | @@ -241,6 +243,7 @@ A Helm chart for Kubernetes | dp_manager_service.port | int | `7900` | | | dp_manager_service.tlsNodePort | int | `nil` | The nodePort for HTTPS service, only used if dp_manager_service.type is NodePort. If not set, a random port will be assigned by Kubernetes. | | dp_manager_service.tlsPort | int | `7943` | | +| dp_manager_service.trafficDistribution | string | `""` | Service traffic distribution preference (e.g. PreferSameZone). Empty omits the field. Supported values depend on the Kubernetes version and feature gates. | | dp_manager_service.type | string | `"ClusterIP"` | | | file_server.enabled | bool | `false` | | | file_server.extraEnvVars | list | `[]` | | diff --git a/charts/api7/templates/dashboard-service.yaml b/charts/api7/templates/dashboard-service.yaml index d897818a..e3b84f7f 100644 --- a/charts/api7/templates/dashboard-service.yaml +++ b/charts/api7/templates/dashboard-service.yaml @@ -11,6 +11,9 @@ metadata: {{- end }} spec: type: {{ .Values.dashboard_service.type }} + {{- with .Values.dashboard_service.trafficDistribution }} + trafficDistribution: {{ . | quote }} + {{- end }} ports: - port: {{ .Values.dashboard_service.port }} targetPort: http diff --git a/charts/api7/templates/developer-portal-service.yaml b/charts/api7/templates/developer-portal-service.yaml index ff977091..fd38437f 100644 --- a/charts/api7/templates/developer-portal-service.yaml +++ b/charts/api7/templates/developer-portal-service.yaml @@ -12,6 +12,9 @@ metadata: {{- end }} spec: type: {{ .Values.developer_portal_service.type }} + {{- with .Values.developer_portal_service.trafficDistribution }} + trafficDistribution: {{ . | quote }} + {{- end }} ports: - port: {{ .Values.developer_portal_service.port }} targetPort: http diff --git a/charts/api7/templates/dp-manager-service.yaml b/charts/api7/templates/dp-manager-service.yaml index 92f02454..948a1971 100644 --- a/charts/api7/templates/dp-manager-service.yaml +++ b/charts/api7/templates/dp-manager-service.yaml @@ -11,6 +11,9 @@ metadata: {{- end }} spec: type: {{ .Values.dp_manager_service.type }} + {{- with .Values.dp_manager_service.trafficDistribution }} + trafficDistribution: {{ . | quote }} + {{- end }} {{- if and (eq .Values.dp_manager_service.type "NodePort") .Values.dp_manager_service.autoAssignNodePort }} {{- if or (lt (int .Values.dp_manager_service.port) 30000) (gt (int .Values.dp_manager_service.port) 32767) }} {{- fail (printf "dp_manager_service.port (%d) must be between 30000 and 32767 when autoAssignNodePort is true" (int .Values.dp_manager_service.port)) }} diff --git a/charts/api7/values.yaml b/charts/api7/values.yaml index 958b3779..5ce9a0a1 100644 --- a/charts/api7/values.yaml +++ b/charts/api7/values.yaml @@ -170,6 +170,8 @@ securityContext: {} dashboard_service: type: ClusterIP + # -- Service traffic distribution preference (e.g. PreferSameZone). Empty omits the field. Supported values depend on the Kubernetes version and feature gates. + trafficDistribution: "" annotations: {} port: 7080 tlsPort: 7443 @@ -198,6 +200,8 @@ dashboard_service: dp_manager_service: type: ClusterIP + # -- Service traffic distribution preference (e.g. PreferSameZone). Empty omits the field. Supported values depend on the Kubernetes version and feature gates. + trafficDistribution: "" # loadBalancerClass: "my-loadbalancer-class" annotations: {} port: 7900 @@ -236,6 +240,8 @@ file_server_service: developer_portal_service: type: ClusterIP + # -- Service traffic distribution preference (e.g. PreferSameZone). Empty omits the field. Supported values depend on the Kubernetes version and feature gates. + trafficDistribution: "" annotations: {} port: 4321 ingress: