Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(NSC): change service.local internal traffic policy posture #1774

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

aauren
Copy link
Collaborator

@aauren aauren commented Dec 4, 2024

@mrueg @twz123 @rbrtbnfgl

Over time, feedback from users has been that our interpretation of how the kube-router service.local annotation interacts with the internal traffic policy has been that it is too restrictive.

It seems like tuning it to fall in line with the local internal traffic policy is too restrictive. This commit changes that posture, by equating the service.local annotation with External Traffic Policy Local and Internal Traffic Policy Cluster.

This means that when service.local is set the following will be true:

  • ExternalIPs / LoadBalancer IPs will only be available on a node that hosts the workload
  • ExternalIPs / LoadBalancer IPs will only be BGP advertised (when enabled) by nodes that host the workload
  • Services will have the same posture as External Traffic Policy set to local
  • ClusterIPs will be available on all nodes for LoadBalancing
  • ClusterIPs will only be BGP advertised (when enabled) by nodes that host the workload
  • Cluster IP services will have the same posture as Internal Traffic Policy set to cluster

For anyone desiring the original functionality of the service.local annotation that has been in place since kube-router v2.1.0, all that would need to be done is to set internalTrafficPolicy to Local as described here: https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/

Over time, feedback from users has been that our interpretation of how
the kube-router service.local annotation interacts with the internal
traffic policy has been that it is too restrictive.

It seems like tuning it to fall in line with the local internal traffic
policy is too restrictive. This commit changes that posture, by equating
the service.local annotation with External Traffic Policy Local and
Internal Traffic Policy Cluster.

This means that when service.local is set the following will be true:

* ExternalIPs / LoadBalancer IPs will only be available on a node that
  hosts the workload
* ExternalIPs / LoadBalancer IPs will only be BGP advertised (when
  enabled) by nodes that host the workload
* Services will have the same posture as External Traffic Policy set to
  local
* ClusterIPs will be available on all nodes for LoadBalancing
* ClusterIPs will only be BGP advertised (when enabled) by nodes that
  host the workload
* Cluster IP services will have the same posture as Internal Traffic
  Policy set to cluster

For anyone desiring the original functionality of the service.local
annotation that has been in place since kube-router v2.1.0, all that
would need to be done is to set `internalTrafficPolicy` to Local as
described here: https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/
@mrueg mrueg merged commit 44439d6 into master Dec 4, 2024
7 checks passed
@mrueg mrueg deleted the change_posture_of_service_local_internal_policy branch December 4, 2024 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants