Skip to content

feat(lightspeed): replace RAG init container with OKP deployment - #500

Open
maysunfaisal wants to merge 2 commits into
redhat-developer:mainfrom
maysunfaisal:okp-integration-1
Open

feat(lightspeed): replace RAG init container with OKP deployment#500
maysunfaisal wants to merge 2 commits into
redhat-developer:mainfrom
maysunfaisal:okp-integration-1

Conversation

@maysunfaisal

@maysunfaisal maysunfaisal commented Aug 18, 2026

Copy link
Copy Markdown

Description of the change

Replace the Lightspeed RAG init container / FAISS vector store with an OKP (Offline Knowledge Portal) backend and swap the Lightspeed dynamic plugins to the Intelligent Assistant plugins.

OKP deployment

  • Add OKP Deployment, Service, Route, and Ingress templates (Solr 8983 + httpd 8080) under templates/lightspeed/.
  • Platform-aware config selection (_helpers.tpl): OpenShift — or K8s with okp.ingress.host set — uses the full OKP config; vanilla K8s uses lightspeed-stack-no-okp.yaml so LCORE does not crash without an OKP backend.
  • Add okp.* values (image, replicas, Solr memory, ingress, imagePullSecrets); OKP image pinned to registry.redhat.io/offline-knowledge-portal/rhokp-rhel9:1.2.10-1786628394.

Plugin swap (Intelligent Assistant)

  • values.yaml FE + BE plugins → oci://quay.io/rhdh/red-hat-developer-hub-backstage-plugin-intelligent-assistant(-backend):{{ "{{inherit}}" }}, enabled: true.

Config & images

  • Split LCORE config into lightspeed-stack.yaml (OKP) + lightspeed-stack-no-okp.yaml (no-OKP), add vector_store config, update rhdh-profile.py/secret.yaml.
  • Align the LCORE sidecar with the OGX image (quay.io/lightspeed-core/lightspeed-stack:dev-20260811-0da4b12); drop the RAG init container from backstage-deployment.yaml.
  • Sync vendored Lightspeed configs from lightspeed-configs@main (hack/sync-lightspeed-configs.sh).

Which issue(s) does this PR fix or relate to

https://redhat.atlassian.net/browse/RHIDP-16102

How to test changes / Special notes to the reviewer

On OpenShift:

  1. Install the chart with lightspeed enabled and provide your inference key (e.g. OPENAI_API_KEY) via the Lightspeed secret.
  2. Verify:
    • RHDH pod up with the lightspeed-core sidecar (no RAG init container); OKP Deployment/Service/Route 1/1 Running.
    • OKP_SERVICE_URL injected into the sidecar; LCORE GET /v1/models returns 200.
    • Intelligent Assistant UI: general chat returns OKP RAG sources; Notebooks answers from an uploaded doc.

On vanilla K8s:

  • Without okp.ingress.host: OKP is skipped, lightspeed-stack-no-okp.yaml is used, LCORE starts without crashing.
  • With okp.ingress.host set: OKP + Ingress are deployed and used.

Checklist

  • For each Chart updated, version bumped in the corresponding Chart.yaml according to Semantic Versioning.
  • For each Chart updated, variables are documented in values.yaml and added to the corresponding README.md (regenerated via the helm-docs pre-commit hook).
  • JSON Schema template updated and re-generated the raw schema via the pre-commit hook.
  • Tests pass using the Chart Testing tool and the ct lint command.
  • N/A — orchestrator-infra chart not touched.

@maysunfaisal
maysunfaisal requested review from a team as code owners August 18, 2026 19:15
@openshift-ci
openshift-ci Bot requested review from gazarenkov and rm3l August 18, 2026 19:15
@maysunfaisal

Copy link
Copy Markdown
Author

Corresponding rhdh-operator PR redhat-developer/rhdh-operator#3370

@rm3l rm3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maysunfaisal Note that the charts/backstage is being deprecated on main in favor of a brand-new standalone charts/rhdh chart - see #438
I'm just back from vacation but I'm hoping we can get #438 merged as soon as possible. So it'll be great if your changes here could be applied against this new rhdh chart instead. Thanks for your understanding.

@rm3l

rm3l commented Aug 21, 2026

Copy link
Copy Markdown
Member

/hold

@rm3l rm3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maysunfaisal FYI, #438 has just been merged. So it'll be great if your changes here could be applied against this new rhdh chart instead. Thanks.

@maysunfaisal

Copy link
Copy Markdown
Author

@maysunfaisal Note that the charts/backstage is being deprecated on main in favor of a brand-new standalone charts/rhdh chart - see #438 I'm just back from vacation but I'm hoping we can get #438 merged as soon as possible. So it'll be great if your changes here could be applied against this new rhdh chart instead. Thanks for your understanding.

@rm3l Thanks Armel, let me take a look on Tuesday

…DP-16102]

Replace the RAG init container / FAISS vector store with an OKP (Offline
Knowledge Portal) Deployment, Service, and Route. Add platform-aware
config selection: OpenShift (or K8s with okp.ingress.host set) uses the
full OKP config; vanilla K8s uses the lightspeed-stack-no-okp.yaml
variant so LCORE does not crash without an OKP backend. Add OKP Ingress
support, imagePullSecrets, vector_store config, and align/pin the OKP and
LCORE (OGX) images. Swap Lightspeed plugins to Intelligent Assistant.
Add systemArgs/systemEnv for LCORE sidecar (HF_HOME, OTEL_SDK_DISABLED,
--synthesized-config-output). Sync vendored Lightspeed configs from
lightspeed-configs@main. Add docs/lightspeed.md with deployment
scenarios, vanilla K8s prerequisites, and OKP configuration reference.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

@Jdubrick Jdubrick left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good. I think there is some stale RAG references in the readmes though

Comment thread charts/rhdh/values.yaml
Comment on lines +592 to +593
- name: OTEL_SDK_DISABLED
value: "true"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we set it here should it also be included in secret.example.yaml, or wdyt?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats true, we can remove it from secret.example.yaml

{{- $lightspeed := include "rhdh.lightspeed" . | fromYaml -}}
{{- if include "rhdh.lightspeed.okp.active" . }}
apiVersion: apps/v1
kind: Deployment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think everything else runs as non-root in this chart, does this need to follow suit or is it special?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in the latest commit, added allowPrivilegeEscalation: false, runAsNonRoot: true, capabilities.drop: [ALL], and seccompProfile: RuntimeDefault to match the other containers. readOnlyRootFilesystem: true isn't feasible here since Solr (via Lucene) needs to write a lock file into its pre-built index directory at runtime, which is baked into the image.

…[RHIDP-16102]

- Add securityContext to OKP deployment (allowPrivilegeEscalation: false,
  runAsNonRoot: true, capabilities.drop: [ALL], seccompProfile: RuntimeDefault)
- Fix CI test failure: use lightspeed-stack-no-okp.yaml for upgrade test
  ConfigMap to avoid LCORE crash against missing OKP services
- Remove OTEL_SDK_DISABLED from secret.example.yaml (managed by chart)
- Remove stale RAG init container references from README and values.yaml

Co-authored-by: Cursor <cursoragent@cursor.com>
@maysunfaisal
maysunfaisal requested a review from a team as a code owner August 26, 2026 20:37
@sonarqubecloud

Copy link
Copy Markdown

@maysunfaisal

Copy link
Copy Markdown
Author

@rm3l @gazarenkov can i also get a review on this PR alongside redhat-developer/rhdh-operator#3370 (same idea)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants