Skip to content
This repository was archived by the owner on Jul 13, 2026. It is now read-only.
Merged
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
5 changes: 5 additions & 0 deletions api/v1beta1/openstacklightspeed_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ const (

// DevSpec is the internal structure for the Dev field. Not exposed in the CRD.
// May change at any time without backward compatibility.
//
// Supported fields:
// - featureFlags: list of experimental feature flags to enable (e.g. ["okp"])
// - okpChunkFilterQuery: Solr filter query for OKP searches (default: "product:(*openstack* OR *openshift*)")
// - okpRagOnly: when true, only OKP is used as a RAG source (default: false)
type DevSpec struct {
FeatureFlags []string `json:"featureFlags,omitempty"`
OKPChunkFilterQuery string `json:"okpChunkFilterQuery,omitempty"`
Expand Down
12 changes: 7 additions & 5 deletions internal/controller/assets/vector_database_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def ogx_process(ogx_config_source_path: Path, ogx_config_target: dict[str, Any])
def lstack_process(
ogx_config_source_path: Path,
lstack_config_target: dict[str, Any],
okp_rag_only: bool = False,
disable_rag_entries: bool = False,
) -> dict[str, Any]:
"""Update Lightspeed stack config with RAG entries from OGX config source."""
ogx_config_source = load_yaml_file(ogx_config_source_path)
Expand All @@ -246,7 +246,7 @@ def lstack_process(
},
)

if not okp_rag_only:
if not disable_rag_entries:
add_unique(lstack_config_target["rag"]["inline"], vector_store_id)
return lstack_config_target

Expand Down Expand Up @@ -281,10 +281,10 @@ def parse_arguments() -> argparse.Namespace:
help="Path (as pathlib.Path) to the base Lightspeed Stack configuration file",
)
parser.add_argument(
"--okp-rag-only",
"--disable-rag-entries",
action="store_true",
default=False,
help="When set, skip adding vector store IDs to rag.inline (OKP is the only RAG source)",
help="When set, skip adding vector store IDs to rag.inline",
)

return parser.parse_args()
Expand All @@ -294,7 +294,9 @@ def main() -> None:
"""main"""
args = parse_arguments()
config_build(args.vector_db_path, args.ogx_config_path, ogx_process)
lstack_fn = functools.partial(lstack_process, okp_rag_only=args.okp_rag_only)
lstack_fn = functools.partial(
lstack_process, disable_rag_entries=args.disable_rag_entries
)
config_build(args.vector_db_path, args.lightspeed_stack_path, lstack_fn)


Expand Down
2 changes: 1 addition & 1 deletion internal/controller/lcore_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func buildInitContainers(
}
devConfig, _ := parseDevConfig(instance)
if devConfig.OKPRagOnly {
configBuildCmd = append(configBuildCmd, "--okp-rag-only")
configBuildCmd = append(configBuildCmd, "--disable-rag-entries")
}

containers = append(containers, corev1.Container{
Expand Down
Loading