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: