From bd0f5ca6fbb10470bc3a30b9a5c47888907a2657 Mon Sep 17 00:00:00 2001 From: Lukas Piwowarski Date: Wed, 18 Feb 2026 19:11:07 +0100 Subject: [PATCH] Add CSV spec descriptors Add operator-sdk CSV annotations to OpenStackLightspeed spec fields to generate proper spec descriptors in the ClusterServiceVersion manifests. This ensures the operator passes scorecard tests [1] (olm-spec-descriptors test). [1] https://sdk.operatorframework.io/docs/testing-operators/scorecard/ --- api/v1beta1/openstacklightspeed_types.go | 8 ++++++-- ...speed.openstack.org_openstacklightspeeds.yaml | 4 ++-- ...ightspeed-operator.clusterserviceversion.yaml | 16 +++++++++++++++- ...speed.openstack.org_openstacklightspeeds.yaml | 4 ++-- ...ightspeed-operator.clusterserviceversion.yaml | 14 ++++++++++++++ 5 files changed, 39 insertions(+), 7 deletions(-) diff --git a/api/v1beta1/openstacklightspeed_types.go b/api/v1beta1/openstacklightspeed_types.go index 2e78c773..17237357 100644 --- a/api/v1beta1/openstacklightspeed_types.go +++ b/api/v1beta1/openstacklightspeed_types.go @@ -52,6 +52,7 @@ type OpenStackLightspeedSpec struct { // OpenStackLightspeedCore defines the desired state of OpenStackLightspeed type OpenStackLightspeedCore struct { // +kubebuilder:validation:Required + // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="LLM Endpoint" // URL pointing to the LLM LLMEndpoint string `json:"llmEndpoint"` @@ -62,15 +63,18 @@ type OpenStackLightspeedCore struct { LLMEndpointType string `json:"llmEndpointType"` // +kubebuilder:validation:Required + // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Model Name" // Name of the model to use at the API endpoint provided in LLMEndpoint ModelName string `json:"modelName"` // +kubebuilder:validation:Required - // Secret name containing API token for the LLMEndpoint. The key for the field - // in the secret that holds the token should be "apitoken". + // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="LLM Credentials Secret" + // Secret name containing API token for the LLMEndpoint. The secret must contain + // a field named "apitoken" which holds the token value. LLMCredentials string `json:"llmCredentials"` // +kubebuilder:validation:Optional + // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="TLS CA Certificate Bundle" // Configmap name containing a CA Certificates bundle TLSCACertBundle string `json:"tlsCACertBundle"` diff --git a/bundle/manifests/lightspeed.openstack.org_openstacklightspeeds.yaml b/bundle/manifests/lightspeed.openstack.org_openstacklightspeeds.yaml index 81d51188..8bac440e 100644 --- a/bundle/manifests/lightspeed.openstack.org_openstacklightspeeds.yaml +++ b/bundle/manifests/lightspeed.openstack.org_openstacklightspeeds.yaml @@ -72,8 +72,8 @@ spec: type: string llmCredentials: description: |- - Secret name containing API token for the LLMEndpoint. The key for the field - in the secret that holds the token should be "apitoken". + Secret name containing API token for the LLMEndpoint. The secret must contain + a field named "apitoken" which holds the token value. type: string llmDeploymentName: description: Deployment name for LLM providers that require it (e.g., diff --git a/bundle/manifests/openstack-lightspeed-operator.clusterserviceversion.yaml b/bundle/manifests/openstack-lightspeed-operator.clusterserviceversion.yaml index fa7e2ba2..a46a1514 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-02-19T12:53:35Z" + createdAt: "2026-02-19T13:45:56Z" description: AI-powered virtual assistant for Red Hat OpenStack Services on OpenShift features.operators.openshift.io/cnf: "false" features.operators.openshift.io/cni: "false" @@ -66,9 +66,23 @@ spec: name: cluster version: v1alpha1 specDescriptors: + - description: |- + Secret name containing API token for the LLMEndpoint. The secret must contain + a field named "apitoken" which holds the token value. + displayName: LLM Credentials Secret + path: llmCredentials + - description: URL pointing to the LLM + displayName: LLM Endpoint + path: llmEndpoint - description: Type of the provider serving the LLM displayName: Provider Type path: llmEndpointType + - description: Name of the model to use at the API endpoint provided in LLMEndpoint + displayName: Model Name + path: modelName + - description: Configmap name containing a CA Certificates bundle + displayName: TLS CA Certificate Bundle + path: tlsCACertBundle version: v1beta1 description: |- OpenStack Lightspeed is a generative AI-based virtual assistant for Red Hat OpenStack Services on OpenShift (RHOSO) users which integrates into the OpenShift Lightspeed. diff --git a/config/crd/bases/lightspeed.openstack.org_openstacklightspeeds.yaml b/config/crd/bases/lightspeed.openstack.org_openstacklightspeeds.yaml index 270315f4..9b19ba74 100644 --- a/config/crd/bases/lightspeed.openstack.org_openstacklightspeeds.yaml +++ b/config/crd/bases/lightspeed.openstack.org_openstacklightspeeds.yaml @@ -72,8 +72,8 @@ spec: type: string llmCredentials: description: |- - Secret name containing API token for the LLMEndpoint. The key for the field - in the secret that holds the token should be "apitoken". + Secret name containing API token for the LLMEndpoint. The secret must contain + a field named "apitoken" which holds the token value. type: string llmDeploymentName: description: Deployment name for LLM providers that require it (e.g., diff --git a/config/manifests/bases/openstack-lightspeed-operator.clusterserviceversion.yaml b/config/manifests/bases/openstack-lightspeed-operator.clusterserviceversion.yaml index a34803d6..e7fd79dc 100644 --- a/config/manifests/bases/openstack-lightspeed-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/openstack-lightspeed-operator.clusterserviceversion.yaml @@ -43,9 +43,23 @@ spec: name: cluster version: v1alpha1 specDescriptors: + - description: |- + Secret name containing API token for the LLMEndpoint. The secret must contain + a field named "apitoken" which holds the token value. + displayName: LLM Credentials Secret + path: llmCredentials + - description: URL pointing to the LLM + displayName: LLM Endpoint + path: llmEndpoint - description: Type of the provider serving the LLM displayName: Provider Type path: llmEndpointType + - description: Name of the model to use at the API endpoint provided in LLMEndpoint + displayName: Model Name + path: modelName + - description: Configmap name containing a CA Certificates bundle + displayName: TLS CA Certificate Bundle + path: tlsCACertBundle version: v1beta1 description: |- OpenStack Lightspeed is a generative AI-based virtual assistant for Red Hat OpenStack Services on OpenShift (RHOSO) users which integrates into the OpenShift Lightspeed.