From 870e24b832038a2905f2daab5ff54463ecb5a266 Mon Sep 17 00:00:00 2001 From: darox Date: Fri, 17 Oct 2025 11:32:27 +0200 Subject: [PATCH] helm: add trafficDistribution to service spec This commit adds the trafficDistribution field to the service spec in the Helm chart. The default behavior stays the same and the field is optional. Signed-off-by: darox --- charts/podinfo/templates/service.yaml | 3 +++ charts/podinfo/values.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/charts/podinfo/templates/service.yaml b/charts/podinfo/templates/service.yaml index 040769a0a..125934057 100644 --- a/charts/podinfo/templates/service.yaml +++ b/charts/podinfo/templates/service.yaml @@ -34,4 +34,7 @@ spec: {{- end }} selector: {{- include "podinfo.selectorLabels" . | nindent 4 }} + {{- if .Values.service.trafficDistribution }} + trafficDistribution: {{ .Values.service.trafficDistribution }} + {{- end }} {{- end }} diff --git a/charts/podinfo/values.yaml b/charts/podinfo/values.yaml index f34a78cc9..334f64e7f 100644 --- a/charts/podinfo/values.yaml +++ b/charts/podinfo/values.yaml @@ -41,6 +41,8 @@ service: # NOTE: requires privileged container with NET_BIND_SERVICE capability -- this is useful for testing # in local clusters such as kind without port forwarding hostPort: + # Stable from Kubernetes v1.33+ with a value of PreferClose. Additional values are PreferSameZone and PreferSameNode from v1.34+. Empty string means it's disabled. + trafficDistribution: "" # enable h2c protocol (non-TLS version of HTTP/2) h2c: