Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .tekton/integration-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

### OpenAI E2E (`lightspeed-stack-integration-test.yaml`)

Standard e2e test pipeline using OpenAI as the inference provider.
Standard e2e test pipeline using OpenAI as the inference provider. Deploys a single
`lightspeed-stack-service` pod (library mode, OGX in-process) via `pipeline-konflux.sh`.

### RHEL AI E2E (`lightspeed-stack-rhelai-test.yaml`)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ spec:
default: '{"components": [{"name":"lightspeed-stack-0-8", "containerImage": "quay.io/example/lightspeed-stack-0-8:latest"}]}'
type: string
- name: llama-stack-image
description: 'OGX runs from source on UBI (init container clones repo and installs deps). Parameter name kept for backwards compatibility.'
default: 'run-from-source (UBI)'
description: 'Deprecated (library mode). Kept for Konflux parameter compatibility; OGX runs in-process in lightspeed-stack.'
default: 'in-process (library mode)'
type: string
- name: test-name
description: 'The name of the test corresponding to a defined Konflux integration test.'
Expand Down Expand Up @@ -63,7 +63,7 @@ spec:
- name: env
value: '{"COMPUTE_NODE_TYPE":"$(params.compute-node-type)","HOSTED_MANAGEMENT_CLUSTER":"$(params.hosted-management-cluster)"}'
- name: get-stack-images
description: Extract lightspeed-stack image and commit from SNAPSHOT (OGX runs from source in-pod)
description: Extract lightspeed-stack image and commit from SNAPSHOT (Konflux E2E library mode)
runAfter:
- provision-cluster
params:
Expand Down Expand Up @@ -237,6 +237,7 @@ spec:
value: "true"
- name: LIGHTSPEED_STACK_IMAGE
value: "$(params.lightspeedstackimage)"
# LLAMA_STACK_IMAGE: deprecated param; echoed only (library mode, no separate OGX image).
- name: LLAMA_STACK_IMAGE
value: "$(params.llamastackimage)"
- name: NAMESPACE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ spec:
cd tests/e2e-prow/rhoai && chmod +x pipeline-konflux.sh
echo "[e2e] 7/8 Running pipeline-konflux.sh with RHEL AI configs..."
export LLAMA_STACK_CONFIG="$(cd ../../.. && pwd)/tests/e2e/configs/run-rhelai.yaml"
export LCS_CONFIG="$(cd ../../.. && pwd)/tests/e2e/configuration/server-mode/lightspeed-stack-rhelai.yaml"
export LCS_CONFIG="$(cd ../../.. && pwd)/tests/e2e/configuration/library-mode/lightspeed-stack-rhelai.yaml"
./pipeline-konflux.sh
PIPELINE_EXIT=$?
echo "[e2e] 8/8 pipeline-konflux.sh exited with code $PIPELINE_EXIT"
Expand Down
15 changes: 10 additions & 5 deletions docs/testing/e2e_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,21 @@ tests/e2e-prow/
└── rhoai/ # RHOAI / OpenShift E2E
├── run-tests.sh # Entry to run E2E in Prow
├── pipeline.sh # Prow: full vLLM + LCS + behave (main branch workflow)
├── pipeline-konflux.sh # Konflux: OpenAI Llama run-from-source + run-ci.yaml + behave
├── pipeline-konflux.sh # Konflux: library-mode LCS pod + run-ci.yaml + behave
├── pipeline-services.sh # Services for Prow (vLLM OGX image + LCS)
├── pipeline-services-konflux.sh # Services for Konflux (ogx-openai + templated LCS)
├── pipeline-services-konflux.sh # Konflux: library-mode lightspeed-stack pod only
├── pipeline-vllm.sh # vLLM cluster setup (called from pipeline.sh)
├── pipeline-test-pod.sh # Test pod pipeline
├── configs/ # vLLM OGX `run.yaml` (used by pipeline.sh for ogx-config ConfigMap seed)
├── scripts/
│ ├── e2e-ops.sh # E2E ops (e.g. disrupt/restore OGX) — called from prow_utils
│ ├── e2e-ops.sh # E2E ops (Konflux library mode: single LCS pod)
│ ├── bootstrap.sh
│ ├── deploy-vllm.sh
│ ├── fetch-vllm-image.sh
│ ├── get-vllm-pod-info.sh
│ └── gpu-setup.sh
└── manifests/ # OpenShift/Kubernetes manifests
├── lightspeed/ # Lightspeed stack, OGX, mock-jwks, mock-mcp
├── lightspeed/ # LCS pod manifest, ogx-prow (classic Prow), mocks
├── vllm/ # vLLM runtime and inference services (CPU/GPU)
├── operators/ # Operator install (operatorgroup, operators, ds-cluster)
├── namespaces/ # NFD, nvidia-operator
Expand Down Expand Up @@ -287,7 +287,8 @@ For another YAML (`lightspeed-stack-okp-online.yaml`, tool RAG, and so on), repe

| Variable | Default | Description |
|---------------------------------|-------------|-------------------------------------------------------------------------------------------------------------------------------------------|
| `E2E_DEPLOYMENT_MODE` | `server` | `server` or `library`. Drives config paths and which scenarios run (e.g. `@skip-in-library-mode`). |
| `E2E_DEPLOYMENT_MODE` | `server` | `server` or `library`. Drives config paths and which scenarios run (e.g. `@skip-in-library-mode`). Konflux forces `library`. |
| `E2E_LIGHTSPEED_CONFIG_DIR` | see below | Repo-relative folder for Prow/Konflux ConfigMap YAML sources. Konflux default: `tests/e2e/configuration/library-mode`. |
| `E2E_LSC_HOSTNAME` | `localhost` | Host of the Lightspeed Core Stack API. |
| `E2E_LSC_PORT` | `8080` | Port of the Lightspeed Core Stack API. |
| `E2E_OGX_HOSTNAME` | `localhost` | Host of the OGX service (server mode). GitHub Actions repo variable: `E2E_LLAMA_HOSTNAME` (compose maps it here). |
Expand All @@ -313,8 +314,12 @@ For local Docker runs, defaults are usually enough. Override when the stack is o
- **Server mode** (`E2E_DEPLOYMENT_MODE=server`): Lightspeed Core Stack talks to a **separate** OGX service (e.g. `OGX` container). Configs under `configuration/server-mode/` are used. Scenarios that need a dedicated OGX container (e.g. "OGX unreachable") run; those tagged `@skip-in-library-mode` run as well.
- **Library mode** (`E2E_DEPLOYMENT_MODE=library`): OGX runs **in-process** with the app. Configs under `configuration/library-mode/` are used. Scenarios tagged `@skip-in-library-mode` are skipped (no separate OGX to disrupt or query for shields).

**Konflux** (`pipeline-konflux.sh`) always sets `E2E_DEPLOYMENT_MODE=library` and deploys only `lightspeed-stack-service` (no `llama-stack-service`, no `:8321` port-forward). The OpenShift ConfigMap `llama-stack-config` still holds the synthesis profile `run.yaml` mounted into the LCS pod.

Mode is set in `before_all` from `E2E_DEPLOYMENT_MODE` and stored as `context.is_library_mode`.

**Konflux** (`pipeline-konflux.sh`) and the Tekton integration pipelines set `E2E_DEPLOYMENT_MODE=library` and deploy a single `lightspeed-stack-service` pod (no `llama-stack-service` / `ogx-openai.yaml`). **Classic Prow** (`pipeline.sh`) remains server mode with `ogx-prow.yaml`.

---

## Tags and Hooks
Expand Down
105 changes: 80 additions & 25 deletions tests/e2e-prow/rhoai/manifests/lightspeed/lightspeed-stack.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# Konflux / library-mode E2E: single pod with in-process OGX (matches docker-compose-library.yaml).
# Needs ConfigMaps: lightspeed-stack-config, llama-stack-config (legacy name — key run.yaml), rag-data, e2e-skills;
# Secrets: openai-api-key-secret, optional faiss-vector-store-secret, optional vllm-* for RHEL AI.
apiVersion: v1
kind: Pod
metadata:
name: lightspeed-stack-service
spec:
imagePullSecrets:
- name: quay-lightspeed-pull-secret
securityContext:
seccompProfile:
type: RuntimeDefault
# Seed agent-skills fixtures (docker-compose: ./tests/e2e/skills -> /app-root/skills).
# ConfigMap cannot preserve nested skill dirs; extract tarball into emptyDir.
initContainers:
# Seed agent-skills fixtures (docker-compose: ./tests/e2e/skills -> /app-root/skills).
- name: seed-skills
image: busybox:latest
securityContext:
Expand All @@ -25,63 +29,102 @@ spec:
- |
set -e
tar xzf /skills-seed/skills.tgz -C /skills-dest
ls -la /skills-dest
volumeMounts:
- name: skills-seed
mountPath: /skills-seed
readOnly: true
- name: skills
mountPath: /skills-dest
# FAISS BYOK fixture — entrypoint.sh copies seed into KV_RAG_PATH (writable).
- name: seed-rag
image: busybox:latest
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
command:
- /bin/sh
- -c
- |
set -e
if [ ! -f /rag-seed/kv_store.db.gz ]; then
echo "WARN: rag-data ConfigMap missing kv_store.db.gz"
exit 0
fi
gzip -dc /rag-seed/kv_store.db.gz > /rag-dest/kv_store.db
sz=$(wc -c < /rag-dest/kv_store.db)
if [ "$sz" -lt 1048576 ]; then
echo "FATAL: RAG seed too small (${sz} bytes)"
exit 1
fi
volumeMounts:
- name: rag-data
mountPath: /rag-seed
readOnly: true
- name: rag-seed
mountPath: /rag-dest
containers:
- name: lightspeed-stack-container
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
runAsNonRoot: true
runAsUser: 1000
# Match Konflux/Containerfile USER 1001 so library-mode synthesis can write
# ./.generated under /app-root (DEFAULT_SYNTHESIZED_CONFIG_PATH).
runAsUser: 1001
seccompProfile:
type: RuntimeDefault
env:
- name: E2E_OGX_HOSTNAME
- name: OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: llama-stack-ip-secret
name: openai-api-key-secret
key: key
- name: E2E_OPENAI_MODEL
value: "gpt-5.6-luna"
- name: FAISS_VECTOR_STORE_ID
valueFrom:
secretKeyRef:
name: faiss-vector-store-secret
key: id
optional: true
# LCS inference.providers (openai): pydantic-ai reads OPENAI_API_KEY at startup.
- name: OPENAI_API_KEY
- name: RAG_SEED_DIR
value: "/app-root/.e2e-rag-seed"
- name: KV_RAG_PATH
value: "/tmp/e2e-rag-work/kv_store.db"
- name: VLLM_URL
valueFrom:
secretKeyRef:
name: openai-api-key-secret
name: vllm-url-secret
key: key
optional: true
- name: VLLM_API_KEY
valueFrom:
secretKeyRef:
name: vllm-api-key-secret
key: key
optional: true
- name: E2E_OPENAI_MODEL
value: "gpt-5.6-luna"
# Unused for server-mode FAISS (llama pod owns the fixture); keep out of ~/.llama.
- name: KV_RAG_PATH
value: "/app-root/.e2e-rag-work/kv_store.db"
- name: OTEL_SDK_DISABLED
value: "true"
- name: OTEL_ANONYMIZATION_SECRET
value: "lightspeed-stack-otel-anonymization-dev-default"
- name: VLLM_MODEL
valueFrom:
secretKeyRef:
name: vllm-model-secret
key: key
optional: true
- name: OTEL_SDK_DISABLED
value: "true"
- name: OTEL_ANONYMIZATION_SECRET
value: "lightspeed-stack-otel-anonymization-dev-default"
- name: HF_HUB_OFFLINE
value: "1"
image: ${LIGHTSPEED_STACK_IMAGE}
command: ["/bin/sh", "-c", "mkdir -p /tmp/data && exec /app-root/entrypoint.sh"]
command: ["/bin/sh", "-c", "mkdir -p /tmp/data /tmp/e2e-rag-work && exec /app-root/entrypoint.sh"]
ports:
- containerPort: 8080
# TCP probes avoid HTTP/auth. LCS + Llama handshake and large images can take 60–120s before :8080 listens;
# aggressive liveness was killing the container (connection refused) and breaking port-forward sandboxes.
readinessProbe:
tcpSocket:
port: 8080
Expand All @@ -98,16 +141,19 @@ spec:
- name: config
mountPath: /app-root/lightspeed-stack.yaml
subPath: lightspeed-stack.yaml
# Agent skills E2E (skills.feature): matches docker-compose mount path
- name: ogx-run-config
mountPath: /app-root/run.yaml
subPath: run.yaml
- name: rag-seed
mountPath: /app-root/.e2e-rag-seed
readOnly: true
- name: skills
mountPath: /app-root/skills
readOnly: true
# MCPFileAuth E2E: must match authorization_headers paths in lightspeed-stack-mcp-file-auth.yaml (/tmp/mcp-token)
- name: mcp-file-auth-token
mountPath: /tmp/mcp-token
subPath: token
readOnly: true
# InvalidMCPFileAuthConfig E2E: docker-compose mounts tests/e2e/secrets/invalid-mcp-token here
- name: mcp-invalid-file-auth-token
mountPath: /tmp/invalid-mcp-token
subPath: token
Expand All @@ -116,6 +162,15 @@ spec:
- name: config
configMap:
name: lightspeed-stack-config
- name: ogx-run-config
configMap:
name: llama-stack-config
- name: rag-data
configMap:
name: rag-data
optional: true
- name: rag-seed
emptyDir: {}
- name: skills-seed
configMap:
name: e2e-skills
Expand All @@ -126,4 +181,4 @@ spec:
secretName: mcp-file-auth-token
- name: mcp-invalid-file-auth-token
secret:
secretName: mcp-invalid-file-auth-token
secretName: mcp-invalid-file-auth-token
3 changes: 3 additions & 0 deletions tests/e2e-prow/rhoai/manifests/lightspeed/ogx-openai.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# DEPRECATED for Konflux E2E (library mode uses lightspeed-stack.yaml only).
# Retained for reference / historical server-mode experiments — not applied by pipeline-konflux.sh.
#
# OGX from source on UBI: init clones repo + seeds FAISS, main restores seed then uses
# scripts/ogx-entrypoint.sh (same enrich/start path as GitHub Actions docker-compose).
# Needs ConfigMaps: llama-stack-config (run.yaml), rag-data (kv_store.db.gz), lightspeed-stack-config;
Expand Down
Loading
Loading