fix: preserve localityLbSetting.enabled=false in Istio destination rules - #1964
Open
kei-gnu wants to merge 1 commit into
Open
fix: preserve localityLbSetting.enabled=false in Istio destination rules#1964kei-gnu wants to merge 1 commit into
kei-gnu wants to merge 1 commit into
Conversation
Signed-off-by: kei-gnu <61653118+kei-gnu@users.noreply.github.com>
kei-gnu
force-pushed
the
fix-locality-lb-enabled-false
branch
from
August 25, 2026 08:02
ab8ff8a to
9116043
Compare
kei-gnu
marked this pull request as ready for review
August 25, 2026 08:12
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.
Related #1719
Summary
LocalityLbSetting.Enabledis a plain bool with omitempty, so an explicitenabled: falseintrafficPolicy.loadBalancer.localityLbSettingis dropped from the generated DestinationRules (localityLbSetting: {}).Istio treats an unset enabled as the mesh-wide default (enabled), and locality failover is activated whenever outlierDetection is set. Users who set
enabled: falseto keep traffic evenly distributed across zones silently end up with zone-prioritized routing.Changes
LocalityLbSetting.Enabledfromboolto*boolso thatfalseround-trips into the DestinationRule (regenerated deepcopy)TestIstioRouter_LocalityLbSettingEnabledFalse)enabledis already declared asbooleanTesting
Verified locally against kind (Kubernetes 1.35.1) with Istio 1.29.2, using a Flagger image built from this branch.
A Canary with:
With v1.44.0 the generated
podinfo-primary/podinfo-canaryDestinationRules lose the flag:With this branch both DestinationRules keep it:
Also confirmed on the client sidecar (
pilot-agent request GET clusters, two zone-labelled nodes) that the endpoints are no longer split intopriority: 0/1by zone once the flag reaches Istio.