calico icon indicating copy to clipboard operation
calico copied to clipboard

Traffic Distribution feature (kubernetes 1.33)

Open alexdev-wb opened this issue 7 months ago • 5 comments

Expected Behavior

Traffic Distribution feature is in General Availability starting from k8s-1.33. Current implementation fully capable to act as intended.

Current Behavior

Existing Zone Hints ignored if no HintsAnnotation() is present.

Possible Solution

We can remove (deprecated and removed since k8s-1.33) HintsAnnotation() value verification in felix/bpf/proxy/topology.go::ShouldAppendTopologyAwareEndpoint():

    // If hints annotation is not recognized or empty then ignore Topology Aware Hints.
    if hintsAnnotation != "Auto" && hintsAnnotation != "auto" {
        if hintsAnnotation != "" && hintsAnnotation != "Disabled" && hintsAnnotation != "disabled" {
            log.Debugf("Skipping topology aware endpoint filtering since Service has unexpected value '%s' for key '%s'\n", hintsAnnotation, v1.DeprecatedAnnotationTopologyAwareHints)
        }

        return true
    }

Do we actually care why EndpointSlice contain Zone Hint? Or who added it? It could be added by user manually.

There are few cases when ZoneHint could be added:

  • topology-aware-routing annotation
  • trafficDistribution service property
  • user created EnpointSlice.

Proposed modification will handle any endpoint slice conditions (well, zone related only) not matter who added them.

PS

k8s.io/kubernetes/pkg/proxy::ServicePort.HintsAnnotation() is removed since 1.33, so it has to be revisited anyway.

alexdev-wb avatar May 19 '25 13:05 alexdev-wb

@alexdev-wb Thank you for your suggestion. We need to investigate what could be affected by removing hints annotation check.

skoryk-oleksandr avatar May 20 '25 18:05 skoryk-oleksandr

@skoryk-oleksandr Any updates on this?

onesb23 avatar Aug 11 '25 08:08 onesb23

we are considering if it can make 3.31 or soon after

tomastigera avatar Aug 11 '25 16:08 tomastigera

@tomastigera Any updates on this?

onesb23 avatar Oct 20 '25 09:10 onesb23

@tomastigera @skoryk-oleksandr Version 3.31 has already been released. Is there any update regarding this issue?

onesb23 avatar Dec 10 '25 15:12 onesb23