Skip to content

Commit 9f0f702

Browse files
committed
OLS-1980: Add autodiscovery for indexID value
1 parent 1103fbc commit 9f0f702

File tree

8 files changed

+28
-14
lines changed

8 files changed

+28
-14
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ IMAGE_TAG_BASE ?= quay.io/openshift-lightspeed/lightspeed-operator
3535

3636
# BUNDLE_TAG defines the version of the bundle.
3737
# You can use it as an arg. (E.g make bundle BUNDLE_TAG=0.0.1)
38-
BUNDLE_TAG ?= 1.0.5
38+
BUNDLE_TAG ?= 1.0.6
3939

4040
# set the base image for docker files
4141
# You can use it as an arg. (E.g make bundle BASE_IMG=registry.redhat.io/ubi9/ubi-minimal)
@@ -433,4 +433,4 @@ catalog-push: ## Push a catalog image.
433433
.PHONY: konflux-release
434434
konflux-release: kustomize yq
435435
mkdir -p release-konflux
436-
$(KUSTOMIZE) build hack/release-konflux | $(YQ) -s '"release-konflux/" + .metadata.name'
436+
$(KUSTOMIZE) build hack/release-konflux | $(YQ) -s '"release-konflux/" + .metadata.name'

api/v1alpha1/olsconfig_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ type RAGSpec struct {
143143
// +kubebuilder:default:="/rag/vector_db"
144144
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Index Path in the Image"
145145
IndexPath string `json:"indexPath,omitempty"`
146-
// The Index ID of the RAG database
147-
// +kubebuilder:default:="vector_db_index"
146+
// The Index ID of the RAG database. Only needed if there are multiple indices in the database.
147+
// +kubebuilder:default:=""
148148
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Index ID"
149149
IndexID string `json:"indexID,omitempty"`
150150
// The URL of the container image to use as a RAG source

bundle/manifests/lightspeed-operator.clusterserviceversion.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ metadata:
3838
]
3939
capabilities: Basic Install
4040
console.openshift.io/operator-monitoring-default: "true"
41-
createdAt: "2025-10-03T15:49:27Z"
41+
createdAt: "2025-10-10T17:31:05Z"
4242
features.operators.openshift.io/cnf: "false"
4343
features.operators.openshift.io/cni: "false"
4444
features.operators.openshift.io/csi: "false"
@@ -97,7 +97,7 @@ spec:
9797
- description: List of models from the provider
9898
displayName: Models
9999
path: llm.providers[0].models
100-
- description: Defines the model's context window size. Default is specific to provider/model.
100+
- description: Defines the model's context window size, in tokens. The default is 128k tokens.
101101
displayName: Context Window Size
102102
path: llm.providers[0].models[0].contextWindowSize
103103
- description: Model name
@@ -106,7 +106,7 @@ spec:
106106
- description: Model API parameters
107107
displayName: Parameters
108108
path: llm.providers[0].models[0].parameters
109-
- description: Max tokens for response
109+
- description: Max tokens for response. The default is 2048 tokens.
110110
displayName: Max Tokens For Response
111111
path: llm.providers[0].models[0].parameters.maxTokensForResponse
112112
- description: Model API URL
@@ -335,7 +335,7 @@ spec:
335335
- description: The URL of the container image to use as a RAG source
336336
displayName: Image
337337
path: ols.rag[0].image
338-
- description: The Index ID of the RAG database
338+
- description: The Index ID of the RAG database. Only needed if there are multiple indices in the database.
339339
displayName: Index ID
340340
path: ols.rag[0].indexID
341341
- description: The path to the RAG database inside of the container image

bundle/manifests/ols.openshift.io_olsconfigs.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,8 +1036,9 @@ spec:
10361036
RAG source
10371037
type: string
10381038
indexID:
1039-
default: vector_db_index
1040-
description: The Index ID of the RAG database
1039+
default: ""
1040+
description: The Index ID of the RAG database. Only needed
1041+
if there are multiple indices in the database.
10411042
type: string
10421043
indexPath:
10431044
default: /rag/vector_db

config/crd/bases/ols.openshift.io_olsconfigs.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,8 +1036,9 @@ spec:
10361036
RAG source
10371037
type: string
10381038
indexID:
1039-
default: vector_db_index
1040-
description: The Index ID of the RAG database
1039+
default: ""
1040+
description: The Index ID of the RAG database. Only needed
1041+
if there are multiple indices in the database.
10411042
type: string
10421043
indexPath:
10431044
default: /rag/vector_db

config/manifests/bases/lightspeed-operator.clusterserviceversion.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,8 @@ spec:
311311
- description: The URL of the container image to use as a RAG source
312312
displayName: Image
313313
path: ols.rag[0].image
314-
- description: The Index ID of the RAG database
314+
- description: The Index ID of the RAG database. Only needed if there are multiple
315+
indices in the database.
315316
displayName: Index ID
316317
path: ols.rag[0].indexID
317318
- description: The path to the RAG database inside of the container image

docs/olsconfig-ols-openshift-io-v1alpha1.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,7 @@ Required::
17551755

17561756
| `indexID`
17571757
| `string`
1758-
| The Index ID of the RAG database
1758+
| The Index ID of the RAG database. Only needed if there are multiple indices in the database.
17591759

17601760
| `indexPath`
17611761
| `string`

test/e2e/byok_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
. "github.com/onsi/ginkgo/v2"
88
. "github.com/onsi/gomega"
99
olsv1alpha1 "github.com/openshift/lightspeed-operator/api/v1alpha1"
10+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1011
)
1112

1213
var _ = Describe("BYOK", Ordered, Label("BYOK"), func() {
@@ -32,6 +33,16 @@ var _ = Describe("BYOK", Ordered, Label("BYOK"), func() {
3233
Expect(err).NotTo(HaveOccurred())
3334
})
3435

36+
It("should check that the default index ID is empty", FlakeAttempts(5), func() {
37+
olsConfig := &olsv1alpha1.OLSConfig{
38+
ObjectMeta: metav1.ObjectMeta{
39+
Name: OLSCRName,
40+
}}
41+
err := env.Client.Get(olsConfig)
42+
Expect(err).NotTo(HaveOccurred())
43+
Expect(olsConfig.Spec.OLSConfig.RAG[0].IndexID).To(BeEmpty())
44+
})
45+
3546
It("should query the BYOK database", FlakeAttempts(5), func() {
3647
By("Testing OLS service activation")
3748
secret, err := TestOLSServiceActivation(env)

0 commit comments

Comments
 (0)