Adding service.externalTrafficPolicy to the Helm chart - #15
Merged
Conversation
…ic local or cross-node within cluster
Phil Gran (philgran)
force-pushed
the
phil/add-external-traffic-policy
branch
from
July 16, 2026 18:35
d202945 to
c5ac772
Compare
Eric Hibbs (flowstate)
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
values.yaml— newservice.externalTrafficPolicyvalue (default""), with comments explaining when to use it and its trade-off.templates/service.yaml— rendersexternalTrafficPolicyin the Service spec, but only when the value is set andservice.typeisNodePortorLoadBalancer(the Kubernetes API rejects the field on ClusterIP services).README.md— documented the new parameter in the configuration table.Chart.yaml— bumped chart version 0.7.0 → 0.8.0.Behavior before
The Service never set
externalTrafficPolicy, so Kubernetes applied its default ofCluster. With an external passthrough load balancer (e.g. GKE Dataplane v2), traffic landing on a node without a firewall pod is SNATed when forwarded to another node, so the firewall sees a link-local address (e.g.169.254.4.6) instead of the real client IP. The only workaround was patching the Service out-of-band, which the nexthelm upgradewould revert.Behavior after
Unset (default), rendering is unchanged and existing deployments are unaffected. Setting
service.externalTrafficPolicy: Localwith aLoadBalancerorNodePortService makes the load balancer route only to nodes running a firewall pod, eliminating the SNAT hop and preserving client source IPs. If set whileservice.typeisClusterIP, the field is silently omitted rather than producing an invalid manifest.Verified with
helm lintandhelm templateacross default,LoadBalancer,NodePort, andClusterIPconfigurations.