-
Notifications
You must be signed in to change notification settings - Fork 4.6k
xds: Add IsDynamic field to cdsbalancer LB and make it true for RLS
#8793
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
Conversation
Is_Dynamic field to cdsbalancer LB and make it true for RLS configIs_Dynamic field to cdsbalancer LB and make it true for RLS
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8793 +/- ##
==========================================
- Coverage 83.42% 83.35% -0.07%
==========================================
Files 418 418
Lines 32897 33004 +107
==========================================
+ Hits 27443 27510 +67
- Misses 4069 4092 +23
- Partials 1385 1402 +17
🚀 New features to boost your workflow:
|
| type lbConfig struct { | ||
| serviceconfig.LoadBalancingConfig | ||
| ClusterName string `json:"Cluster"` | ||
| IsDynamic bool `json:"Is_Dynamic"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use camelCase (starting with a lower case) for the json annotations. See the outlier detection LB policy's config definition for an example:
| type LBConfig struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it! Changed both. Since the Cluster field was capital , I got confused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the Cluster field was capital
Hmm ... that is weird.
Looks like the json package uses the tags in a case insensitive manner. See: https://pkg.go.dev/encoding/json
|
The PR title needs to be updated to not include the underscore. |
Is_Dynamic field to cdsbalancer LB and make it true for RLSIsDynamic field to cdsbalancer LB and make it true for RLS
This is Part of A74 changes.
This PR add a new
IsDynamicfield to the CDS balancer LB Config. Also sets it to true for RLS cluster specifier plugin.This PR also fixes the test in rls_test.go which earlier was returning if the test has
wantError=trueeffectively not testing the cases after that.This will be used to dynamically start watch for cluster specifier plugin clusters from cds balancer.
RELEASE NOTES: None