@@ -262,7 +262,7 @@ func buildCacheStatefulSet(kvCache *orchestrationv1alpha1.KVCache) *appsv1.State
262
262
263
263
annotations := map [string ]string {
264
264
"prometheus.io/scrape" : "true" ,
265
- "prometheus.io/port" : strconv .Itoa (params . AdminPort ),
265
+ "prometheus.io/port" : strconv .Itoa (2112 ),
266
266
"prometheus.io/path" : "/metrics" ,
267
267
}
268
268
rdmaKey := corev1 .ResourceName ("vke.volcengine.com/rdma" )
@@ -284,6 +284,8 @@ func buildCacheStatefulSet(kvCache *orchestrationv1alpha1.KVCache) *appsv1.State
284
284
"-v" , "$AIBRIX_KVCACHE_BLOCK_SIZE_IN_BYTES" ,
285
285
"-b" , "$AIBRIX_KVCACHE_BLOCK_COUNT" ,
286
286
"--acl" , "any" ,
287
+ "-A" , "$AIBRIX_KVCACHE_RDMA_IP" ,
288
+ "-P" , "$AIBRIX_KVCACHE_ADMIN_PORT" ,
287
289
}
288
290
kvCacheServerArgsStr := strings .Join (kvCacheServerArgs , " " )
289
291
privileged := false // let's use fine-grained permission
@@ -358,6 +360,28 @@ func buildCacheStatefulSet(kvCache *orchestrationv1alpha1.KVCache) *appsv1.State
358
360
},
359
361
},
360
362
},
363
+ {
364
+ Name : "kvcache-hpkv-monitor-agent" ,
365
+ Image : kvCache .Spec .HpkvMonitorAgent .Image ,
366
+ ImagePullPolicy : corev1 .PullPolicy (kvCache .Spec .HpkvMonitorAgent .ImagePullPolicy ),
367
+ Command : []string {
368
+ "/bin/bash" ,
369
+ "-c" ,
370
+ `
371
+ RDMA_IP=$(ip addr show dev eth1 | grep 'inet ' | awk '{print $2}' | awk -F/ '{print $1}')
372
+ echo "Using RDMA IP: $RDMA_IP"
373
+ ./monitor_agent --hpkvAddr=$RDMA_IP
374
+ ` ,
375
+ },
376
+ Ports : []corev1.ContainerPort {
377
+ {
378
+ Name : "hpkv" ,
379
+ ContainerPort : int32 (2112 ),
380
+ Protocol : corev1 .ProtocolTCP ,
381
+ },
382
+ },
383
+ Resources : kvCache .Spec .HpkvMonitorAgent .Resources ,
384
+ },
361
385
},
362
386
Volumes : []corev1.Volume {
363
387
{
0 commit comments