-
Notifications
You must be signed in to change notification settings - Fork 381
feat: support prisdb kvcache data plane metrics #1158
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -262,7 +262,7 @@ func buildCacheStatefulSet(kvCache *orchestrationv1alpha1.KVCache) *appsv1.State | |
|
||
annotations := map[string]string{ | ||
"prometheus.io/scrape": "true", | ||
"prometheus.io/port": strconv.Itoa(params.AdminPort), | ||
"prometheus.io/port": strconv.Itoa(2112), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we extract default values instead of hard-coding them? 🤔 |
||
"prometheus.io/path": "/metrics", | ||
} | ||
rdmaKey := corev1.ResourceName("vke.volcengine.com/rdma") | ||
|
@@ -284,6 +284,8 @@ func buildCacheStatefulSet(kvCache *orchestrationv1alpha1.KVCache) *appsv1.State | |
"-v", "$AIBRIX_KVCACHE_BLOCK_SIZE_IN_BYTES", | ||
"-b", "$AIBRIX_KVCACHE_BLOCK_COUNT", | ||
"--acl", "any", | ||
"-A", "$AIBRIX_KVCACHE_RDMA_IP", | ||
"-P", "$AIBRIX_KVCACHE_ADMIN_PORT", | ||
} | ||
kvCacheServerArgsStr := strings.Join(kvCacheServerArgs, " ") | ||
privileged := false // let's use fine-grained permission | ||
|
@@ -358,6 +360,28 @@ func buildCacheStatefulSet(kvCache *orchestrationv1alpha1.KVCache) *appsv1.State | |
}, | ||
}, | ||
}, | ||
{ | ||
Name: "kvcache-hpkv-monitor-agent", | ||
Image: kvCache.Spec.HpkvMonitorAgent.Image, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can use override mode for this setup. Let me share one example with you. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you check this example? https://github.com/vllm-project/aibrix/blob/main/samples/kvcache/infinistore/kvcache_customized.yaml#L42-L89 in this case, you do not need api level change, you can bake the agent container directly. |
||
ImagePullPolicy: corev1.PullPolicy(kvCache.Spec.HpkvMonitorAgent.ImagePullPolicy), | ||
Command: []string{ | ||
"/bin/bash", | ||
"-c", | ||
` | ||
RDMA_IP=$(ip addr show dev eth1 | grep 'inet ' | awk '{print $2}' | awk -F/ '{print $1}') | ||
echo "Using RDMA IP: $RDMA_IP" | ||
./monitor_agent --hpkvAddr=$RDMA_IP | ||
`, | ||
}, | ||
Ports: []corev1.ContainerPort{ | ||
{ | ||
Name: "hpkv", | ||
ContainerPort: int32(2112), | ||
Protocol: corev1.ProtocolTCP, | ||
}, | ||
}, | ||
Resources: kvCache.Spec.HpkvMonitorAgent.Resources, | ||
}, | ||
}, | ||
Volumes: []corev1.Volume{ | ||
{ | ||
|
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.
I kind of forgot we plan to use a separate pod or just a sidecar of kvcache watcher role?
If we plan to use sidecar, we do not necessarily need to introduce the api change here?