-
Notifications
You must be signed in to change notification settings - Fork 435
Support distributed hashing mode kv cache pool #984
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
Support distributed hashing mode kv cache pool #984
Conversation
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.
Pull Request Overview
This PR adds support for distributed hashing mode with a KV cache pool by introducing new reconciliation logic for stateful sets, watcher pods, and redis services. Key changes include:
- New constants and RBAC rules to support KV cache watcher and stateful set objects.
- Implementation of functions for reconciling stateful sets, watcher pods, and redis-related resources.
- Updates to CRD defaults and types to support pointer-based storage fields.
Reviewed Changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
pkg/controller/kvcache/kvcache_controller.go | Added new constants and functions to reconcile stateful sets. |
pkg/controller/kvcache/distributed.go | Introduced distributed mode functions, watcher pod, and redis logic. |
pkg/controller/kvcache/centralized.go | Updated metadata service reconciliation to invoke redis support. |
config/rbac/controller-manager/role.yaml | Added RBAC rules for stateful sets and their status updates. |
config/crd/orchestration/orchestration.aibrix.ai_kvcaches.yaml | Updated CRD defaults and removal of extra required fields. |
cmd/kvcache-watcher/main.go | New watcher binary implementation for registering pod events. |
api/orchestration/v1alpha1/zz_generated.deepcopy.go | Adjusted deepcopy logic for pointer types in storage fields. |
api/orchestration/v1alpha1/kvcache_types.go | Updated storage type in RedisConfig and EtcdConfig to pointer types. |
Files not reviewed (2)
- Makefile: Language not supported
- build/container/Dockerfile.kvcache: Language not supported
Comments suppressed due to low confidence (1)
pkg/controller/kvcache/distributed.go:230
- The variable name 'statfulset' appears to be a typo. It should be renamed to 'statefulset' for clarity.
statfulset := &appsv1.StatefulSet{
Namespace: kvCache.Namespace, | ||
Labels: map[string]string{ | ||
KVCacheLabelKeyIdentifier: kvCache.Name, | ||
KVCacheLabelKeyRole: KVCacheLabelValueRoleMetadata, |
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.
The watcher pod is being labeled with KVCacheLabelValueRoleMetadata instead of using the dedicated watcher role. Consider using KVCacheLabelValueRoleKVWatcher to clearly identify watcher pods.
KVCacheLabelKeyRole: KVCacheLabelValueRoleMetadata, | |
KVCacheLabelKeyRole: KVCacheLabelValueRoleKVWatcher, |
Copilot uses AI. Check for mistakes.
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.
resolved. nice catch
- Add kvcache watcher programe - Add kvcache-watcher build and push scripts - Update distributed kv cache orchestration - Fix linter errors - Address review feedback Signed-off-by: Jiaxin Shan <seedjeffwan@gmail.com>
35e4454
to
b53b156
Compare
Due to limited reviewers this week. I will merge this request |
- Add kvcache watcher programe - Add kvcache-watcher build and push scripts - Update distributed kv cache orchestration - Fix linter errors - Address review feedback Signed-off-by: Jiaxin Shan <seedjeffwan@gmail.com>
Pull Request Description
Support distributed hashing mode kv cache pool
Related Issues
Resolves: part of #928
Important: Before submitting, please complete the description above and review the checklist below.
Contribution Guidelines (Expand for Details)
We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:
Pull Request Title Format
Your PR title should start with one of these prefixes to indicate the nature of the change:
[Bug]
: Corrections to existing functionality[CI]
: Changes to build process or CI pipeline[Docs]
: Updates or additions to documentation[API]
: Modifications to aibrix's API or interface[CLI]
: Changes or additions to the Command Line Interface[Misc]
: For changes not covered above (use sparingly)Note: For changes spanning multiple categories, use multiple prefixes in order of importance.
Submission Checklist
By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.