feat: add performance improvements #1065
Merged
oliverbaehler merged 5 commits intoJul 1, 2026
Merged
Conversation
Signed-off-by: Oliver Baehler <oliver@sudo-i.net>
Signed-off-by: Oliver Baehler <oliver@sudo-i.net>
Signed-off-by: Oliver Baehler <oliver@sudo-i.net>
…eat/cert-duration
Signed-off-by: Oliver Baehler <oliver@sudo-i.net>
There was a problem hiding this comment.
Pull request overview
This PR introduces several runtime and deployment-level changes aimed at improving request handling performance and adding optional Kubernetes API Priority and Fairness (APF) support for capsule-proxy.
Changes:
- Add cached user/group reuse in
GetUserAndGroups()and a test verifying the cache prevents duplicate TokenReview calls. - Improve XFCC parsing error reporting and escaping behavior.
- Add cluster-scoped resource discovery/validation helpers and introduce optional Helm APF (FlowSchema + PriorityLevelConfiguration) configuration.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/runtime/validation/cluster_resource.go | Adds discovery-backed validation utilities for cluster-scoped resources and allowed operations. |
| internal/request/xfcc.go | Enhances XFCC parsing error context and handling of escapes within quoted strings. |
| internal/request/http.go | Uses cached username/groups from request context to avoid repeated authentication work. |
| internal/request/http_test.go | Updates websocket bearer test data and adds a test to ensure caching is used. |
| charts/capsule-proxy/values.yaml | Adds APF-related values for FlowSchema/PriorityLevelConfiguration. |
| charts/capsule-proxy/values.schema.json | Adds schema for the new APF values. |
| charts/capsule-proxy/templates/flowschema.yaml | Adds templated APF resources gated by a values flag and API availability. |
| charts/capsule-proxy/README.md | Documents the new APF chart values. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| errs = append(errs, fmt.Errorf( | ||
| "%s.operations[%d]: unsupported operation %q, only %q is supported", |
|
|
||
| if !slices.Contains(resource.Verbs, "list") { | ||
| errs = append(errs, fmt.Errorf( | ||
| "%s.resources: resource %q in API group %q does not support LIST", |
prometherion
approved these changes
Jul 1, 2026
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.
No description provided.