diff --git a/README.md b/README.md index 5773d8b..cabf83e 100644 --- a/README.md +++ b/README.md @@ -135,9 +135,6 @@ metadata: name: openstack-lightspeed namespace: openstack spec: -$(if [ -n "$RHOS_LS_IMAGE" ]; then - echo " ragImage: $RHOS_LS_IMAGE" -fi) llmEndpoint: $LLM_ENDPOINT llmEndpointType: openai llmCredentials: openstack-lightspeed-apitoken diff --git a/api/v1beta1/openstacklightspeed_types.go b/api/v1beta1/openstacklightspeed_types.go index 79cb143..60edb29 100644 --- a/api/v1beta1/openstacklightspeed_types.go +++ b/api/v1beta1/openstacklightspeed_types.go @@ -95,10 +95,6 @@ type DatabaseSpec struct { type OpenStackLightspeedSpec struct { OpenStackLightspeedCore `json:",inline"` - // +kubebuilder:validation:Optional - // ContainerImage for the OpenStack Lightspeed RAG container (will be set to environmental default if empty) - RAGImage string `json:"ragImage"` - // +kubebuilder:validation:Optional // +kubebuilder:default=false // Enables automatic OCP documentation based on cluster version diff --git a/bundle/manifests/lightspeed.openstack.org_openstacklightspeeds.yaml b/bundle/manifests/lightspeed.openstack.org_openstacklightspeeds.yaml index 8176063..038034d 100644 --- a/bundle/manifests/lightspeed.openstack.org_openstacklightspeeds.yaml +++ b/bundle/manifests/lightspeed.openstack.org_openstacklightspeeds.yaml @@ -178,10 +178,6 @@ spec: When false, uses reference_url (online). type: boolean type: object - ragImage: - description: ContainerImage for the OpenStack Lightspeed RAG container - (will be set to environmental default if empty) - type: string tlsCACertBundle: description: Configmap name containing a CA Certificates bundle type: string diff --git a/bundle/manifests/openstack-lightspeed-operator.clusterserviceversion.yaml b/bundle/manifests/openstack-lightspeed-operator.clusterserviceversion.yaml index a98f96a..54e5d3c 100644 --- a/bundle/manifests/openstack-lightspeed-operator.clusterserviceversion.yaml +++ b/bundle/manifests/openstack-lightspeed-operator.clusterserviceversion.yaml @@ -25,7 +25,7 @@ metadata: ] capabilities: Basic Install categories: AI/Machine Learning - createdAt: "2026-06-22T19:14:00Z" + createdAt: "2026-07-03T16:05:52Z" description: AI-powered virtual assistant for Red Hat OpenStack Services on OpenShift features.operators.openshift.io/cnf: "false" features.operators.openshift.io/cni: "false" diff --git a/config/crd/bases/lightspeed.openstack.org_openstacklightspeeds.yaml b/config/crd/bases/lightspeed.openstack.org_openstacklightspeeds.yaml index 2612ab5..88f534e 100644 --- a/config/crd/bases/lightspeed.openstack.org_openstacklightspeeds.yaml +++ b/config/crd/bases/lightspeed.openstack.org_openstacklightspeeds.yaml @@ -178,10 +178,6 @@ spec: When false, uses reference_url (online). type: boolean type: object - ragImage: - description: ContainerImage for the OpenStack Lightspeed RAG container - (will be set to environmental default if empty) - type: string tlsCACertBundle: description: Configmap name containing a CA Certificates bundle type: string diff --git a/internal/controller/lcore_deployment.go b/internal/controller/lcore_deployment.go index eeb1356..26cd48c 100644 --- a/internal/controller/lcore_deployment.go +++ b/internal/controller/lcore_deployment.go @@ -269,7 +269,7 @@ func buildInitContainers( var containers []corev1.Container containers = append(containers, corev1.Container{ Name: "vector-database-collect", - Image: instance.Spec.RAGImage, + Image: apiv1beta1.OpenStackLightspeedDefaultValues.RAGImageURL, Command: func() []string { cmd := []string{ "sh", VectorDBScriptsMountPath + "/" + VectorDBCollectScriptKey, diff --git a/internal/controller/ocp_version.go b/internal/controller/ocp_version.go index 169b3ec..c731940 100644 --- a/internal/controller/ocp_version.go +++ b/internal/controller/ocp_version.go @@ -250,7 +250,7 @@ func BuildRAGConfigs(instance *apiv1beta1.OpenStackLightspeed, ocpVersion string rags := []interface{}{ // OpenStack RAG map[string]interface{}{ - "image": instance.Spec.RAGImage, + "image": apiv1beta1.OpenStackLightspeedDefaultValues.RAGImageURL, "indexPath": OpenStackLightspeedVectorDBPath, }, } @@ -258,7 +258,7 @@ func BuildRAGConfigs(instance *apiv1beta1.OpenStackLightspeed, ocpVersion string // Add OCP RAG if enabled if ocpVersion != "" { rags = append(rags, map[string]interface{}{ - "image": instance.Spec.RAGImage, + "image": apiv1beta1.OpenStackLightspeedDefaultValues.RAGImageURL, "indexPath": GetOCPVectorDBPath(ocpVersion), "indexID": GetOCPIndexName(ocpVersion), }) diff --git a/internal/controller/ocp_version_test.go b/internal/controller/ocp_version_test.go index 17f90d5..e9c7339 100644 --- a/internal/controller/ocp_version_test.go +++ b/internal/controller/ocp_version_test.go @@ -234,12 +234,10 @@ func TestResolveOCPVersion(t *testing.T) { } func TestBuildRAGConfigs(t *testing.T) { + apiv1beta1.OpenStackLightspeedDefaultValues.RAGImageURL = testRAGImage + t.Run("OCP RAG disabled (empty version)", func(t *testing.T) { - instance := &apiv1beta1.OpenStackLightspeed{ - Spec: apiv1beta1.OpenStackLightspeedSpec{ - RAGImage: testRAGImage, - }, - } + instance := &apiv1beta1.OpenStackLightspeed{} configs := BuildRAGConfigs(instance, "") @@ -268,11 +266,7 @@ func TestBuildRAGConfigs(t *testing.T) { }) t.Run("OCP RAG enabled", func(t *testing.T) { - instance := &apiv1beta1.OpenStackLightspeed{ - Spec: apiv1beta1.OpenStackLightspeedSpec{ - RAGImage: testRAGImage, - }, - } + instance := &apiv1beta1.OpenStackLightspeed{} configs := BuildRAGConfigs(instance, "4.16") @@ -332,11 +326,7 @@ func TestBuildRAGConfigs(t *testing.T) { }) t.Run("OCP RAG with latest version", func(t *testing.T) { - instance := &apiv1beta1.OpenStackLightspeed{ - Spec: apiv1beta1.OpenStackLightspeedSpec{ - RAGImage: testRAGImage, - }, - } + instance := &apiv1beta1.OpenStackLightspeed{} configs := BuildRAGConfigs(instance, "latest") diff --git a/internal/controller/openstacklightspeed_controller.go b/internal/controller/openstacklightspeed_controller.go index 6f5f871..1610bc8 100644 --- a/internal/controller/openstacklightspeed_controller.go +++ b/internal/controller/openstacklightspeed_controller.go @@ -159,10 +159,6 @@ func (r *OpenStackLightspeedReconciler) Reconcile(ctx context.Context, req ctrl. return ctrl.Result{}, nil } - if instance.Spec.RAGImage == "" { - instance.Spec.RAGImage = apiv1beta1.OpenStackLightspeedDefaultValues.RAGImageURL - } - if instance.Spec.MaxTokensForResponse == 0 { instance.Spec.MaxTokensForResponse = apiv1beta1.OpenStackLightspeedDefaultValues.MaxTokensForResponse }