feat: convert IR APIKeyAuth Credentials Map into a Slice of Struct#7584
Merged
arkodg merged 4 commits intoenvoyproxy:mainfrom Nov 26, 2025
Merged
feat: convert IR APIKeyAuth Credentials Map into a Slice of Struct#7584arkodg merged 4 commits intoenvoyproxy:mainfrom
arkodg merged 4 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Lalet Scaria <laletscaria@gmail.com>
zirain
reviewed
Nov 23, 2025
| } | ||
|
|
||
| credentials := make(map[string]ir.PrivateBytes) | ||
| credentials := make([]ir.Credential, 0) |
Member
There was a problem hiding this comment.
can we prealloc the size of slice?
Contributor
Author
There was a problem hiding this comment.
Have found similar usage here
Member
There was a problem hiding this comment.
@lalet I think this is what @zirain meant 👉#7584 (comment)
zhaohuabing
reviewed
Nov 24, 2025
internal/ir/xds.go
Outdated
| // Credential defines a single API key credential. | ||
| // | ||
| // +k8s:deepcopy-gen=true | ||
| type Credential struct { |
Member
There was a problem hiding this comment.
The name Credential is a bit too broad. Would APICredential be a better fit?
…/api-key-auth-credentials-slice
Signed-off-by: Lalet Scaria <lscaria@ripple.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7584 +/- ##
=======================================
Coverage 72.33% 72.34%
=======================================
Files 232 232
Lines 34114 34120 +6
=======================================
+ Hits 24678 24685 +7
- Misses 7661 7663 +2
+ Partials 1775 1772 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
zhaohuabing
reviewed
Nov 25, 2025
Signed-off-by: Lalet Scaria <lscaria@ripple.com>
zhaohuabing
approved these changes
Nov 26, 2025
kkk777-7
approved these changes
Nov 26, 2025
Member
|
LGTM, thanks! |
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.
This PR converts the APIKeyAuth.Credentials field in the internal IR from a map[string]PrivateBytes to a slice of Credential structs ([]Credential). This change ensures that the order of credentials is preserved, which is important for deterministic behavior and testing.
Fixes #7568