Skip to content
Open
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
4 changes: 2 additions & 2 deletions api/v1alpha1/olsconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ type RAGSpec struct {
// +kubebuilder:default:="/rag/vector_db"
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Index Path in the Image"
IndexPath string `json:"indexPath,omitempty"`
// The Index ID of the RAG database
// +kubebuilder:default:="vector_db_index"
// The Index ID of the RAG database. Only needed if there are multiple indices in the database.
// +kubebuilder:default:=""
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Index ID"
IndexID string `json:"indexID,omitempty"`
// The URL of the container image to use as a RAG source
Expand Down
5 changes: 3 additions & 2 deletions config/crd/bases/ols.openshift.io_olsconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1027,8 +1027,9 @@ spec:
RAG source
type: string
indexID:
default: vector_db_index
description: The Index ID of the RAG database
default: ""
description: The Index ID of the RAG database. Only needed
if there are multiple indices in the database.
type: string
indexPath:
default: /rag/vector_db
Expand Down
2 changes: 1 addition & 1 deletion docs/olsconfig-ols-openshift-io-v1alpha1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,7 @@ Required::

| `indexID`
| `string`
| The Index ID of the RAG database
| The Index ID of the RAG database. Only needed if there are multiple indices in the database.

| `indexPath`
| `string`
Expand Down
11 changes: 11 additions & 0 deletions test/e2e/byok_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
olsv1alpha1 "github.com/openshift/lightspeed-operator/api/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

var _ = Describe("BYOK", Ordered, Label("BYOK"), func() {
Expand All @@ -31,6 +32,16 @@ var _ = Describe("BYOK", Ordered, Label("BYOK"), func() {
Expect(err).NotTo(HaveOccurred())
})

It("should check that the default index ID is empty", FlakeAttempts(5), func() {
olsConfig := &olsv1alpha1.OLSConfig{
ObjectMeta: metav1.ObjectMeta{
Name: OLSCRName,
}}
err := env.Client.Get(olsConfig)
Expect(err).NotTo(HaveOccurred())
Expect(olsConfig.Spec.OLSConfig.RAG[0].IndexID).To(BeEmpty())
})

It("should query the BYOK database", FlakeAttempts(5), func() {
By("Testing OLS service activation")
secret, err := TestOLSServiceActivation(env)
Expand Down