From e9f5c3007cd7ee531f47ec1aa72c31830a35005e Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Fri, 3 Jul 2026 17:08:19 +0100 Subject: [PATCH] Remove ragImage configuration from CR For tech preview, the RAG images are built with specific requirements (e.g., bundled with OKP embedding model) that are not yet available to customers. Removing the field prevents users from supplying custom RAG images that would lack these dependencies and break things. The operator continues to use the image pinned via the RELATED_IMAGE_OPENSTACK_LIGHTSPEED_IMAGE_URL_DEFAULT environment variable, which is set to a known image at operator build time. Signed-off-by: Lucas Alvares Gomes --- README.md | 3 --- api/v1beta1/openstacklightspeed_types.go | 4 ---- ...ed.openstack.org_openstacklightspeeds.yaml | 4 ---- ...tspeed-operator.clusterserviceversion.yaml | 2 +- ...ed.openstack.org_openstacklightspeeds.yaml | 4 ---- internal/controller/lcore_deployment.go | 2 +- internal/controller/ocp_version.go | 4 ++-- internal/controller/ocp_version_test.go | 20 +++++-------------- .../openstacklightspeed_controller.go | 4 ---- 9 files changed, 9 insertions(+), 38 deletions(-) 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 }