Skip to content

Commit 2ebec10

Browse files
committed
add mcp to the lightspeed stack config
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
1 parent 4ea3387 commit 2ebec10

3 files changed

Lines changed: 23 additions & 2 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Verify the vendored files are already in sync without writing changes:
6464
./hack/sync-lightspeed-configs.sh --ref main --check
6565
```
6666

67-
The script copies the upstream config files directly, except it renders `secret.yaml` from upstream `env/default-values.env` by dropping comment lines plus `LIGHTSPEED_CORE_IMAGE` and `RAG_CONTENT_IMAGE`, then converting each remaining `KEY=value` line into the chart's YAML secret payload.
67+
The script copies the upstream config files directly, except it appends the chart-managed `mcp_servers` block to `lightspeed-stack.yaml` and renders `secret.yaml` from upstream `env/default-values.env` by dropping comment lines plus `LIGHTSPEED_CORE_IMAGE` and `RAG_CONTENT_IMAGE`, then converting each remaining `KEY=value` line into the chart's YAML secret payload.
6868
Choose the upstream branch or tag that matches the Lightspeed release you want to vendor.
6969

7070
**Important:** After any change to the dependency structure or version of the vendored chart, you must rebuild the lock file and local subchart dependencies:

charts/backstage/vendor/backstage/charts/backstage/files/lightspeed/lightspeed-stack.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,9 @@ conversation_cache:
3535
db_path: '/tmp/cache.db'
3636
customization:
3737
profile_path: '/app-root/rhdh-profile.py'
38+
mcp_servers:
39+
- name: mcp-integration-tools
40+
provider_id: "model-context-protocol"
41+
url: "http://localhost:7007/api/mcp-actions/v1"
42+
authorization_headers:
43+
Authorization: "client"

hack/sync-lightspeed-configs.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LIGHTSPEED_DIR="${REPO_ROOT}/charts/backstage/vendor/backstage/charts/backstage/
1111

1212
# Format: upstream_path|destination_path|transform_function
1313
TARGETS=(
14-
"lightspeed-core-configs/lightspeed-stack.yaml|${LIGHTSPEED_DIR}/lightspeed-stack.yaml|copy_fetched_file"
14+
"lightspeed-core-configs/lightspeed-stack.yaml|${LIGHTSPEED_DIR}/lightspeed-stack.yaml|render_lightspeed_stack_yaml"
1515
"llama-stack-configs/config.yaml|${LIGHTSPEED_DIR}/config.yaml|copy_fetched_file"
1616
"lightspeed-core-configs/rhdh-profile.py|${LIGHTSPEED_DIR}/rhdh-profile.py|copy_fetched_file"
1717
"env/default-values.env|${LIGHTSPEED_DIR}/secret.yaml|render_secret_yaml_from_env"
@@ -24,6 +24,21 @@ copy_fetched_file() {
2424
cp "${source_file}" "${destination_file}"
2525
}
2626

27+
render_lightspeed_stack_yaml() {
28+
local source_file=$1
29+
local destination_file=$2
30+
31+
cp "${source_file}" "${destination_file}"
32+
cat <<'EOF' >> "${destination_file}"
33+
mcp_servers:
34+
- name: mcp-integration-tools
35+
provider_id: "model-context-protocol"
36+
url: "http://localhost:7007/api/mcp-actions/v1"
37+
authorization_headers:
38+
Authorization: "client"
39+
EOF
40+
}
41+
2742
render_secret_yaml_from_env() {
2843
local source_file=$1
2944
local destination_file=$2

0 commit comments

Comments
 (0)