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: allow setting hashOn.input in KongUpstreamPolicy #4979

Merged
merged 4 commits into from
Oct 26, 2023

Conversation

czeslavo
Copy link
Contributor

@czeslavo czeslavo commented Oct 25, 2023

What this PR does / why we need it:

Allows setting hashOn(Fallback).input to use one of predefined consistent hashing algorithm inputs (ip, consumer, and path). I overlooked that in the initial CRD definition.

Also adds validation rules that ensure hashOn(Fallback) can only be set when algorithm is set to consistent-hashing.

Which issue this PR fixes:

Part of #3174.

@czeslavo czeslavo added the area/feature New feature or request label Oct 25, 2023
@czeslavo czeslavo self-assigned this Oct 25, 2023
@czeslavo czeslavo added this to the KIC v3.0.0 milestone Oct 25, 2023
@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (44561d6) 77.6% compared to head (72929b2) 75.2%.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #4979     +/-   ##
=======================================
- Coverage   77.6%   75.2%   -2.5%     
=======================================
  Files        167     167             
  Lines      18708   18710      +2     
=======================================
- Hits       14532   14080    -452     
- Misses      3345    3790    +445     
- Partials     831     840      +9     
Files Coverage Δ
...dataplane/parser/translators/kongupstreampolicy.go 88.1% <100.0%> (+0.2%) ⬆️

... and 28 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@czeslavo czeslavo marked this pull request as ready for review October 25, 2023 17:36
@czeslavo czeslavo requested a review from a team as a code owner October 25, 2023 17:36
@czeslavo czeslavo enabled auto-merge (squash) October 25, 2023 17:38
@czeslavo czeslavo requested a review from pmalek October 26, 2023 09:47
pmalek
pmalek previously approved these changes Oct 26, 2023
@czeslavo czeslavo force-pushed the feat/kongupstreampolicy-hash-input branch 2 times, most recently from 3a41a56 to 5fd8082 Compare October 26, 2023 09:56
@czeslavo
Copy link
Contributor Author

@pmalek PTAL again, I only backed off from naming changes that I didn't intend to include in this PR.

@czeslavo czeslavo force-pushed the feat/kongupstreampolicy-hash-input branch from 5fd8082 to 72929b2 Compare October 26, 2023 10:20
@czeslavo czeslavo merged commit c184988 into main Oct 26, 2023
35 checks passed
@czeslavo czeslavo deleted the feat/kongupstreampolicy-hash-input branch October 26, 2023 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/feature New feature or request size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants