Skip to content

Commit 33d8bc7

Browse files
fullsend-ai-coder[bot]gabemonteroclaude
authored
feat(#3668): update boost app-config and load-secrets for local dev (#3669)
* feat(#3668): update boost app-config and load-secrets for local dev Align app-config.yaml with the config structure expected by boost backend plugins after merging the frontend scaffold (#3645) and Kagenti auth (#3661) PRs: - Remove stale boost.model and boost.entityProviders sections - Add boost.security.adminUsers for dev admin panel access - Add boost.providers.llamastack.defaultModel field - Rename LLAMASTACK_BASE_URL env var to BOOST_LLAMA_STACK_URL - Add boost.providers.kagenti.defaultAgent - Add boost.kagenti.baseUrl, namespace, and dev convenience flags (showAllNamespaces, skipTlsVerify, verboseStreamLogging) Update load-secrets.sh with best-effort Llama Stack route discovery via OGX operator labels (ogx.io/watch, managed-by, part-of). The discovery warns on failure and exports BOOST_LLAMA_STACK_URL. Closes #3668 * fix(boost): conditional export and bash best practices for load-secrets.sh - Guard BOOST_LLAMA_STACK_URL export with [[ -n ]] check so an empty value does not override the localhost fallback in app-config.yaml - Use [[ instead of [ for conditional tests (shellcheck/sonarcloud) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(boost): use [[ in remaining conditional test in load-secrets.sh Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: fullsend-code <278716306+fullsend-ai-coder[bot]@users.noreply.github.com> Co-authored-by: gabemontero <gmontero@redhat.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent de71949 commit 33d8bc7

2 files changed

Lines changed: 43 additions & 15 deletions

File tree

workspaces/boost/app-config.yaml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,30 +63,27 @@ catalog:
6363
boost:
6464
security:
6565
mode: 'development-only-no-auth'
66-
67-
model:
68-
baseUrl: ${BOOST_MODEL_BASE_URL:-http://localhost:8080/v1}
69-
name: ${BOOST_MODEL:-default}
66+
adminUsers:
67+
- 'user:default/admin'
68+
- 'user:default/guest'
7069

7170
providers:
7271
llamastack:
73-
baseUrl: ${LLAMASTACK_BASE_URL:-http://localhost:8321}
74-
72+
baseUrl: ${BOOST_LLAMA_STACK_URL:-http://localhost:8321}
73+
defaultModel: ${BOOST_MODEL:-default}
7574
kagenti:
7675
baseUrl: ${KAGENTI_BASE_URL:-http://localhost:8080}
76+
defaultAgent: default
7777
namespaces:
7878
- ${KAGENTI_NAMESPACE:-default}
7979

8080
kagenti:
81+
baseUrl: ${KAGENTI_BASE_URL:-http://localhost:8080}
82+
namespace: ${KAGENTI_NAMESPACE:-default}
8183
auth:
8284
tokenEndpoint: ${KAGENTI_TOKEN_ENDPOINT:-}
8385
clientId: ${KAGENTI_CLIENT_ID:-}
8486
clientSecret: ${KAGENTI_CLIENT_SECRET:-}
85-
86-
entityProviders:
87-
kagenti:
88-
baseUrl: ${KAGENTI_BASE_URL:-http://localhost:8080}
89-
namespaces:
90-
- ${KAGENTI_NAMESPACE:-default}
91-
agentRefreshIntervalSeconds: 300
92-
toolRefreshIntervalSeconds: 300
87+
showAllNamespaces: true
88+
skipTlsVerify: true
89+
verboseStreamLogging: true

workspaces/boost/scripts/load-secrets.sh

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ _load_field() {
2121
echo " WARNING: failed to read $1 from secret ${NAMESPACE}/${SECRET_NAME}" >&2
2222
return 1
2323
}
24-
if [ -z "${val}" ]; then
24+
if [[ -z "${val}" ]]; then
2525
echo " WARNING: $1 is empty in secret ${NAMESPACE}/${SECRET_NAME}" >&2
2626
return 1
2727
fi
@@ -37,8 +37,38 @@ BOOST_MODEL=$(_load_field AUGMENT_MODEL) || { echo "Abort
3737

3838
unset -f _load_field
3939

40+
# Discover Llama Stack route via OGX operator labels (best-effort)
41+
_discover_llama_stack_route() {
42+
local route_host=""
43+
local label
44+
for label in "ogx.io/watch=true" \
45+
"app.kubernetes.io/managed-by=ogx-operator" \
46+
"app.kubernetes.io/part-of=ogx"; do
47+
route_host=$(kubectl get routes --all-namespaces \
48+
-l "$label" \
49+
-o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.host}{"\n"}{end}' 2>/dev/null \
50+
| grep -i "llama" \
51+
| head -1 \
52+
| awk '{print $2}')
53+
if [[ -n "$route_host" ]]; then
54+
echo "https://${route_host}"
55+
return 0
56+
fi
57+
done
58+
return 1
59+
}
60+
61+
BOOST_LLAMA_STACK_URL=$(_discover_llama_stack_route) || {
62+
echo " WARNING: no Llama Stack route found via OGX labels — set BOOST_LLAMA_STACK_URL manually" >&2
63+
}
64+
65+
unset -f _discover_llama_stack_route
66+
4067
export KAGENTI_CLIENT_SECRET KAGENTI_CLIENT_ID KAGENTI_TOKEN_ENDPOINT
4168
export KAGENTI_BASE_URL KAGENTI_NAMESPACE BOOST_MODEL
69+
if [[ -n "$BOOST_LLAMA_STACK_URL" ]]; then
70+
export BOOST_LLAMA_STACK_URL
71+
fi
4272
export NODE_TLS_REJECT_UNAUTHORIZED=0
4373

4474
echo "Loaded: KAGENTI_BASE_URL=$KAGENTI_BASE_URL"
@@ -47,5 +77,6 @@ echo "Loaded: KAGENTI_CLIENT_ID=$KAGENTI_CLIENT_ID"
4777
echo "Loaded: KAGENTI_CLIENT_SECRET=<set>"
4878
echo "Loaded: KAGENTI_TOKEN_ENDPOINT=$KAGENTI_TOKEN_ENDPOINT"
4979
echo "Loaded: BOOST_MODEL=$BOOST_MODEL"
80+
echo "Loaded: BOOST_LLAMA_STACK_URL=${BOOST_LLAMA_STACK_URL:-<not discovered>}"
5081
echo "Set: NODE_TLS_REJECT_UNAUTHORIZED=0 (for self-signed OpenShift route certs)"
5182
echo "Ready — launch the debugger in this shell."

0 commit comments

Comments
 (0)