Skip to content

Commit 6a09734

Browse files
Merge pull request #118 from umago/okp-follow-up
OKP Follow-up
2 parents 651fae6 + f11e412 commit 6a09734

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

api/v1beta1/openstacklightspeed_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ const (
5252

5353
// DevSpec is the internal structure for the Dev field. Not exposed in the CRD.
5454
// May change at any time without backward compatibility.
55+
//
56+
// Supported fields:
57+
// - featureFlags: list of experimental feature flags to enable (e.g. ["okp"])
58+
// - okpChunkFilterQuery: Solr filter query for OKP searches (default: "product:(*openstack* OR *openshift*)")
59+
// - okpRagOnly: when true, only OKP is used as a RAG source (default: false)
5560
type DevSpec struct {
5661
FeatureFlags []string `json:"featureFlags,omitempty"`
5762
OKPChunkFilterQuery string `json:"okpChunkFilterQuery,omitempty"`

internal/controller/assets/vector_database_build.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def ogx_process(ogx_config_source_path: Path, ogx_config_target: dict[str, Any])
221221
def lstack_process(
222222
ogx_config_source_path: Path,
223223
lstack_config_target: dict[str, Any],
224-
okp_rag_only: bool = False,
224+
disable_rag_entries: bool = False,
225225
) -> dict[str, Any]:
226226
"""Update Lightspeed stack config with RAG entries from OGX config source."""
227227
ogx_config_source = load_yaml_file(ogx_config_source_path)
@@ -246,7 +246,7 @@ def lstack_process(
246246
},
247247
)
248248

249-
if not okp_rag_only:
249+
if not disable_rag_entries:
250250
add_unique(lstack_config_target["rag"]["inline"], vector_store_id)
251251
return lstack_config_target
252252

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

290290
return parser.parse_args()
@@ -294,7 +294,9 @@ def main() -> None:
294294
"""main"""
295295
args = parse_arguments()
296296
config_build(args.vector_db_path, args.ogx_config_path, ogx_process)
297-
lstack_fn = functools.partial(lstack_process, okp_rag_only=args.okp_rag_only)
297+
lstack_fn = functools.partial(
298+
lstack_process, disable_rag_entries=args.disable_rag_entries
299+
)
298300
config_build(args.vector_db_path, args.lightspeed_stack_path, lstack_fn)
299301

300302

internal/controller/lcore_deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ func buildInitContainers(
280280
}
281281
devConfig, _ := parseDevConfig(instance)
282282
if devConfig.OKPRagOnly {
283-
configBuildCmd = append(configBuildCmd, "--okp-rag-only")
283+
configBuildCmd = append(configBuildCmd, "--disable-rag-entries")
284284
}
285285

286286
containers = append(containers, corev1.Container{

0 commit comments

Comments
 (0)