-
Notifications
You must be signed in to change notification settings - Fork 7
Support lightspeed-stack v0.7.0 #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
147c6f4
0546762
97456e3
96a4705
cdd1d61
091e0cd
2a2751c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,7 +62,7 @@ const ( | |
| PostgresNetworkPolicyName = "lightspeed-postgres-server" | ||
| PostgresServicePort = int32(5432) | ||
| PostgresLightspeedStackDbName = "lightspeed-stack" | ||
| PostgresLlamaStackDbName = "llamastack" | ||
| PostgresLlamaStackDbName = "ogx" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
rg -n -C 4 \
'PostgresLlamaStackDbName|PostgresBootStrapScriptContent|CREATE DATABASE|llamastack|ogx' \
internal/controller --glob '*.go' --glob '*.sh'
rg -n -C 4 \
'llamastack|ogx|postgres' \
test/kuttl internal/controller/assets/postgres_bootstrap.sh \
--glob '*.yaml' --glob '*.sh' || trueRepository: openstack-k8s-operators/lightspeed-operator Length of output: 50399 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- postgres_bootstrap.sh ---'
cat -n internal/controller/assets/postgres_bootstrap.sh
printf '%s\n' '--- postgres_bootstrap.sql ---'
cat -n internal/controller/assets/postgres_bootstrap.sql
printf '%s\n' '--- postgres deployment environment ---'
sed -n '90,155p' internal/controller/postgres_deployment.go
printf '%s\n' '--- PostgreSQL reconciliation and storage references ---'
rg -n -C 5 \
'PostgresBootstrap|CreateOrPatch|PostgresDeployment|buildLlamaStackStorage|PostgresLlamaStackDbName|POSTGRESQL_LLAMA_STACK_DATABASE|POSTGRESQL_DATABASE' \
internal/controller --glob '*.go' --glob '*.sh'
printf '%s\n' '--- migration and upgrade references ---'
rg -n -i -C 3 \
'migration|upgrade|existing database|llamastack|conversation|bootstrap' \
README.md docs internal test --glob '*.go' --glob '*.yaml' --glob '*.yml' --glob '*.sh' --glob '*.md' \
2>/dev/null | head -n 500 || trueRepository: openstack-k8s-operators/lightspeed-operator Length of output: 50399 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- previous database configuration ---'
git show HEAD^:internal/controller/constants.go 2>/dev/null | sed -n '55,70p' || true
git show HEAD^:internal/controller/assets/postgres_bootstrap.sql 2>/dev/null | sed -n '1,80p' || true
printf '%s\n' '--- current storage configuration ---'
sed -n '285,335p' internal/controller/llama_stack_config.go
printf '%s\n' '--- exact database-name references ---'
rg -n -i \
'llamastack|llama.stack|openai_conversations|conversation' \
internal test docs README.md --glob '*.go' --glob '*.sql' --glob '*.sh' --glob '*.yaml' --glob '*.yml' --glob '*.md' \
2>/dev/null | head -n 300 || true
printf '%s\n' '--- read-only bootstrap invariant probe ---'
python3 - <<'PY'
from pathlib import Path
sql = Path("internal/controller/assets/postgres_bootstrap.sql").read_text()
assert "CREATE DATABASE" in sql
assert "\\gexec" in sql
assert "pg_database" in sql
print("database creation is conditional on pg_database and executed with gexec")
for marker in ("INSERT INTO", "COPY ", "pg_dump", "pg_restore", "ALTER DATABASE"):
print(f"{marker}: {'present' if marker in sql.upper() else 'absent'}")
PYRepository: openstack-k8s-operators/lightspeed-operator Length of output: 20078 Migrate existing conversation data to The bootstrap SQL creates 🤖 Prompt for AI Agents |
||
| PostgresSharedBuffers = "256MB" | ||
| PostgresMaxConnections = 100 | ||
| OpenStackLightspeedComponentPasswordFileName = "password" | ||
|
|
@@ -81,8 +81,8 @@ const ( | |
| PostgresVarRunVolumeMountPath = "/var/run/postgresql" | ||
|
|
||
| // PostgresSQLUsername is non-admin user that should be used by lightspeed-stack and | ||
| // llama-stack (OGX) to access the PostgreSQL database. This user gets created by the | ||
| // PostgreSQL container by setting the POSTGRESQL_USER and POSTGRESQL_PASSWORD environment | ||
| // (OGX) to access the PostgreSQL database. This user gets created by the PostgreSQL | ||
| // container by setting the POSTGRESQL_USER and POSTGRESQL_PASSWORD environment | ||
| // variable. | ||
| PostgresSQLUsername = "lightspeed-app-user" | ||
|
|
||
|
|
@@ -113,7 +113,7 @@ const ( | |
| // -- LCore specific --------------------------------------------------------- | ||
|
|
||
| LlamaStackContainerPort = int32(8321) | ||
| LlamaStackConfigCmName = "llama-stack-config" | ||
| LlamaStackConfigCmName = "ogx-config" | ||
| LCoreConfigCmName = "lightspeed-stack-config" | ||
| LCoreDeploymentName = "lightspeed-stack-deployment" | ||
| LCoreConfigMountPath = "/app-root/lightspeed-stack.yaml" | ||
|
|
@@ -122,7 +122,7 @@ const ( | |
|
|
||
| // --------------------------------------------------------------------------- | ||
|
|
||
| // -- Health probe settings for the llama-stack/OGX container. --------------- | ||
| // -- Health probe settings for the stack/OGX container. --------------------- | ||
|
|
||
| // The startup probe allows up to 30 failures (300s) for the slow initialization, | ||
| // while liveness and readiness probes use a tighter threshold of 3 failures. | ||
|
|
@@ -314,10 +314,6 @@ const ( | |
| // script is stored in the ConfigMap containing vector database init scripts. | ||
| VectorDBBuildScriptKey = "vector_database_build.py" | ||
|
|
||
| // LlamaStartupWrapperKey is the ConfigMap key for the startup wrapper script | ||
| // that monkey-patches the asyncpg event loop bug fix. Remove with PR #5837 backport. | ||
| LlamaStartupWrapperKey = "llama_startup_wrapper.py" // #nosec G101 -- ConfigMap key, not a credential | ||
|
|
||
| // -- Resource Version Annotation -------------------------------------------- | ||
|
|
||
| // These constants define annotation keys used to track the resource versions of specific ConfigMaps. | ||
|
|
@@ -449,13 +445,6 @@ var vectorDatabaseCollectScript string | |
| //go:embed assets/vector_database_build.py | ||
| var vectorDatabaseBuildScript string | ||
|
|
||
| // llamaStartupWrapperScript is a Python monkey-patch that fixes the asyncpg | ||
| // event loop bug (ogx-ai/ogx#5978) by resetting SQL engines after StackApp | ||
| // initialization. Remove when the container image includes upstream PR #5837. | ||
| // | ||
| //go:embed assets/llama_startup_wrapper.py | ||
| var llamaStartupWrapperScript string | ||
|
|
||
| //go:embed assets/console_nginx.conf.tmpl | ||
| var consoleNginxConfigTemplate string | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: openstack-k8s-operators/lightspeed-operator
Length of output: 181
🏁 Script executed:
Repository: openstack-k8s-operators/lightspeed-operator
Length of output: 6510
Use an absolute symlink target.
When
LOCALBINis relative, line 362 creates a broken symlink because the target is resolved fromLOCALBIN. Use$(abspath $(1)-$(3)-$(GO_VERSION))as the target.🤖 Prompt for AI Agents
Source: Path instructions