Skip to content

Conversation

@Wangzy455
Copy link

@Wangzy455 Wangzy455 commented Dec 29, 2025

What type of PR is this?

/kind documentation

What this PR does / why we need it:
add a new dir to save testdata

Which issue(s) this PR fixes:
Fixes #602

Special notes for your reviewer:
NONE
Does this PR introduce a user-facing change?:
NONE

@volcano-sh-bot volcano-sh-bot added the kind/documentation Improvements or additions to documentation label Dec 29, 2025
@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hzxuzhonghu for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot
Copy link
Contributor

Welcome @Wangzy455! It looks like this is your first PR to volcano-sh/kthena 🎉

@gemini-code-assist
Copy link

Summary of Changes

Hello @Wangzy455, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the end-to-end testing infrastructure by adding a dedicated testdata directory. This new collection of Kubernetes manifest files provides ready-to-use configurations for a wide array of Kthena functionalities, including advanced model routing, serving, and boosting scenarios, as well as necessary supporting services like Redis. This addition streamlines the process of setting up and validating complex inference serving setups.

Highlights

  • New Test Data Directory: A new directory, test/e2e/testdata, has been introduced to centralize Kubernetes manifest files used for end-to-end testing.
  • Comprehensive Kthena Router Examples: The kthena-router subdirectory now contains various YAML configurations for Gateway API resources (Gateway, HTTPRoute, InferencePool) and Kthena's custom ModelRoute and ModelServer resources, demonstrating features like model routing, rate limiting, canary deployments, and prefill/decode disaggregation.
  • Model Booster and Model Serving Examples: New test data includes configurations for ModelBooster and ModelServing resources, showcasing different model deployments, including CPU and NPU-specific setups, multi-node serving, and network topology policies.
  • Redis Deployment for Kthena Features: A standalone Redis deployment, along with a README, has been added to support Kthena features like KV Cache Aware Plugin and Global Rate Limit in testing environments.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a testdata directory for end-to-end tests, centralizing test configurations. This is a good organizational improvement. My review of the newly added YAML files has identified a few areas for improvement. There are some inconsistencies in resource references, such as parentRefs in HTTPRoute and ModelRoute pointing to a non-existent Gateway. Some configurations use Docker images from private registries, which could be problematic for community contributors. I also found an incorrect environment variable definition, some configurations that could be made more readable, and a typo in a filename (ModelServer-ds1.5b-pd-disaggragation.yaml should be disaggregation). I've provided specific suggestions for these points in the comments.

parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: default

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The parentRefs.name is set to default, but the Gateway defined in test/e2e/testdata/kthena-router/Gateway.yaml is named kthena-gateway. For this HTTPRoute to correctly attach to the Gateway, the names must match.

    name: kthena-gateway

spec:
modelName: "deepseek-binding-gateway"
parentRefs:
- name: "default"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The parentRefs.name is default, which doesn't match the Gateway name kthena-gateway from test/e2e/testdata/kthena-router/Gateway.yaml. This will prevent the ModelRoute from binding to the gateway.

  - name: "kthena-gateway"

Comment on lines 23 to 24
- name: HUGGING_FACE_HUB_TOKEN
value: $HUGGING_FACE_HUB_TOKEN

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The value $HUGGING_FACE_HUB_TOKEN will be treated as a literal string by Kubernetes. If you intend to use a value from a secret, you should use valueFrom to reference the secret.

                  - name: HUGGING_FACE_HUB_TOKEN
                    valueFrom:
                      secretKeyRef:
                        name: your-secret-name
                        key: your-secret-key

Comment on lines 72 to 73
- name: HUGGING_FACE_HUB_TOKEN
value: $HUGGING_FACE_HUB_TOKEN

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The value $HUGGING_FACE_HUB_TOKEN will be treated as a literal string by Kubernetes. If you intend to use a value from a secret, you should use valueFrom to reference the secret.

                  - name: HUGGING_FACE_HUB_TOKEN
                    valueFrom:
                      secretKeyRef:
                        name: your-secret-name
                        key: your-secret-key

mountPath: /models
containers:
- name: prefill
image: kvcache-container-image-hb2-cn-beijing.cr.volces.com/aibrix/vllm-openai:v0.10.0-cu128-nixl-v0.4.1-lmcache-0.3.2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Docker image kvcache-container-image-hb2-cn-beijing.cr.volces.com/aibrix/vllm-openai:v0.10.0-cu128-nixl-v0.4.1-lmcache-0.3.2 (also used on line 120) appears to be from a private or region-specific registry. This could make it difficult for other contributors to run these E2E tests. Consider using an image from a public, globally accessible registry.

value: $HUGGING_FACE_HUB_TOKEN
volumeMounts:
- mountPath: /dev/shm
name: dshm

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is trailing whitespace on this line. It should be removed for consistency and cleanliness.

                    name: dshm

Comment on lines 82 to 83
- "--kv-transfer-config"
- '{"kv_connector":"MooncakeConnectorV1","kv_buffer_device":"npu","kv_role":"kv_producer","kv_parallel_size":1,"kv_port":"20001","engine_id":"0","kv_rank":0,"kv_connector_module_path":"vllm_ascend.distributed.mooncake_connector","kv_connector_extra_config":{"prefill":{"dp_size":2,"tp_size":2},"decode":{"dp_size":2,"tp_size":2}}}'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This long JSON string is hard to read and maintain. Consider moving it to a ConfigMap and referencing it using valueFrom.configMapKeyRef. This would improve readability and make it easier to manage the configuration. The same applies to the kv-transfer-config on line 204.

namespace: <your-namespace> # Same namespace as Kthena
type: Opaque
data:
REDIS_PASSWORD: "base64-encoded-password" # Use empty string "" for no password

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment # Use empty string "" for no password could be slightly confusing. It's more accurate to say that for an empty password, the value should be an empty string "", which is the Base64 encoding of an empty string.

Suggested change
REDIS_PASSWORD: "base64-encoded-password" # Use empty string "" for no password
REDIS_PASSWORD: "base64-encoded-password" # Base64-encoded password. For no password, use an empty string "".

@@ -0,0 +1,11 @@
apiVersion: gateway.networking.k8s.io/v1
Copy link
Member

@YaoZengzeng YaoZengzeng Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,98 @@
apiVersion: workload.serving.volcano.sh/v1alpha1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently only router related yamls need to be added,

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get

@YaoZengzeng
Copy link
Member

@Wangzy455 Update these calls https://github.com/volcano-sh/kthena/blob/main/test/e2e/router/e2e_test.go#L101 as well.

All these calls under test/e2e/router.

@Wangzy455
Copy link
Author

@Wangzy455 Update these calls https://github.com/volcano-sh/kthena/blob/main/test/e2e/router/e2e_test.go#L101 as well.

All these calls under test/e2e/router.

get

@Wangzy455
Copy link
Author

@YaoZengzeng Sorry, I think I have added all the YAML files we need, including ModelRouteSimple.yaml.

@hzxuzhonghu
Copy link
Member

/ok-to-test

@hzxuzhonghu
Copy link
Member

nit: prefer test/e2e/router/testdata

Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should make the tests loading these new yamls

@Wangzy455
Copy link
Author

You should make the tests loading these new yamls

ok i'll fix it

// Deploy ModelRoute
t.Log("Deploying ModelRoute...")
modelRoute := utils.LoadYAMLFromFile[networkingv1alpha1.ModelRoute]("examples/kthena-router/ModelRouteSimple.yaml")
modelRoute := utils.LoadYAMLFromFile[networkingv1alpha1.ModelRoute]("test/e2e/router/testdata/ModelRouteSimple.yaml")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The yamls are not in this dir

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get

@hzxuzhonghu
Copy link
Member

Failure panic: Failed to read YAML file from project root: test/e2e/router/testdata/ModelRouteSimple.yaml (abs: /home/runner/work/kthena/kthena/test/e2e/router/testdata/ModelRouteSimple.yaml): open /home/runner/work/kthena/kthena/test/e2e/router/testdata/ModelRouteSimple.yaml: no such file or directory

Signed-off-by: Wangzy <[email protected]>
Signed-off-by: Wangzy <[email protected]>
@YaoZengzeng
Copy link
Member

@Wangzy455 you can run the tests in your local env and make sure they all pass.

@Wangzy455
Copy link
Author

@Wangzy455 you can run the tests in your local env and make sure they all pass.

get

@YaoZengzeng
Copy link
Member

Friendly ping @Wangzy455

Any update?

@Wangzy455
Copy link
Author

Friendly ping @Wangzy455

Any update?

Sorry I was a bit busy last week, I'll finish it as soon as possible this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/documentation Improvements or additions to documentation ok-to-test size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add testdata to store yamls needed by E2E tests

4 participants