[PR #951] [MERGED] feat(store_service): support load config from env for mooncake store_service #1920

Closed
opened 2026-10-29 21:31:24 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/Mooncake/pull/951
Author: @Syspretor
Created: 10/23/2025
Status: ✅ Merged
Merged: 10/23/2025
Merged by: @stmatengss

Base: main ← Head: feat/support-load-config-from-env


📝 Commits (1)

  • ee8ad85 support load config from env for mooncake store_service

📊 Changes

3 files changed (+81 additions, -8 deletions)

View changed files

📝 docs/source/getting_started/examples/sglang-integration/hicache-integration-v1.md (+12 -0)
📝 mooncake-wheel/mooncake/mooncake_config.py (+38 -5)
📝 mooncake-wheel/tests/test_mooncake_config.py (+31 -3)

📄 Description

Currently, it only supports to use env["MOONCAKE_CONFIG_PATH"] which specifies the path of config file to configure the Mooncake store_service. When deploying the Mooncake store_service in a Kubernetes, using file-based configuration is neither flexible nor intuitive. The capability of configuring from env is already supported when enabling Mooncake in SGLang backend. Therefore, in this PR, we have added support for the following:

  1. Support loading configuration information from environment variables when starting the Mooncake store_service.
  2. Referencing [feat(mooncake): support GB suffix for global_segment_size], allow users to configure MOONCAKE_GLOBAL_SEGMENT_SIZE using gb as a unit.

Both of these features are aligned with the behavior of enabling Mooncake in the SGlang backend. So that we can launch a Mooncake store_service in Kubernetes Pod with some necessary env without mounting a configmap:

  - name: mooncake-store
    replicas: 1
    template:
      spec:
        containers:
        - name: store
          image: $IMAGE
          env:
          - name: MOONCAKE_MASTER
            value: "$MOONCAKE_MASTER_ADDRESS:50051"
          - name: MOONCAKE_TE_META_DATA_SERVER
            value: "$MOONCAKE_MASTER_ADDRESS:8080/metadata"
          - name: MOONCAKE_GLOBAL_SEGMENT_SIZE
            value: "10gb"
          command:
          - sh
          - -c
          - "python -m mooncake.mooncake_store_service"
          resources:
            limits:
              memory: "10Gi"
            requests:
              memory: "10Gi"

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/Mooncake/pull/951 **Author:** [@Syspretor](https://github.com/Syspretor) **Created:** 10/23/2025 **Status:** ✅ Merged **Merged:** 10/23/2025 **Merged by:** [@stmatengss](https://github.com/stmatengss) **Base:** `main` ← **Head:** `feat/support-load-config-from-env` --- ### 📝 Commits (1) - [`ee8ad85`](https://github.com/kvcache-ai/Mooncake/commit/ee8ad85631abf39a58ae14d57bf44466f414ab2b) support load config from env for mooncake store_service ### 📊 Changes **3 files changed** (+81 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `docs/source/getting_started/examples/sglang-integration/hicache-integration-v1.md` (+12 -0) 📝 `mooncake-wheel/mooncake/mooncake_config.py` (+38 -5) 📝 `mooncake-wheel/tests/test_mooncake_config.py` (+31 -3) </details> ### 📄 Description Currently, it only supports to use env["MOONCAKE_CONFIG_PATH"] which specifies the path of config file to configure the Mooncake store_service. When deploying the Mooncake store_service in a Kubernetes, using file-based configuration is neither flexible nor intuitive. The capability of configuring from env is already supported when enabling Mooncake in SGLang backend. Therefore, in this PR, we have added support for the following: 1. Support loading configuration information from environment variables when starting the Mooncake store_service. 2. Referencing [[feat(mooncake): support GB suffix for global_segment_size]](https://github.com/sgl-project/sglang/pull/10745), allow users to configure MOONCAKE_GLOBAL_SEGMENT_SIZE using gb as a unit. Both of these features are aligned with the behavior of enabling Mooncake in the SGlang backend. So that we can launch a Mooncake store_service in Kubernetes Pod with some necessary env without mounting a configmap: ```yaml - name: mooncake-store replicas: 1 template: spec: containers: - name: store image: $IMAGE env: - name: MOONCAKE_MASTER value: "$MOONCAKE_MASTER_ADDRESS:50051" - name: MOONCAKE_TE_META_DATA_SERVER value: "$MOONCAKE_MASTER_ADDRESS:8080/metadata" - name: MOONCAKE_GLOBAL_SEGMENT_SIZE value: "10gb" command: - sh - -c - "python -m mooncake.mooncake_store_service" resources: limits: memory: "10Gi" requests: memory: "10Gi" ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:31:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/Mooncake#1920
No description provided.