Skip to content

Commit bd0f5ca

Browse files
committed
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/
1 parent d701bf4 commit bd0f5ca

5 files changed

Lines changed: 39 additions & 7 deletions

api/v1beta1/openstacklightspeed_types.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ type OpenStackLightspeedSpec struct {
5252
// OpenStackLightspeedCore defines the desired state of OpenStackLightspeed
5353
type OpenStackLightspeedCore struct {
5454
// +kubebuilder:validation:Required
55+
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="LLM Endpoint"
5556
// URL pointing to the LLM
5657
LLMEndpoint string `json:"llmEndpoint"`
5758

@@ -62,15 +63,18 @@ type OpenStackLightspeedCore struct {
6263
LLMEndpointType string `json:"llmEndpointType"`
6364

6465
// +kubebuilder:validation:Required
66+
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Model Name"
6567
// Name of the model to use at the API endpoint provided in LLMEndpoint
6668
ModelName string `json:"modelName"`
6769

6870
// +kubebuilder:validation:Required
69-
// Secret name containing API token for the LLMEndpoint. The key for the field
70-
// in the secret that holds the token should be "apitoken".
71+
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="LLM Credentials Secret"
72+
// Secret name containing API token for the LLMEndpoint. The secret must contain
73+
// a field named "apitoken" which holds the token value.
7174
LLMCredentials string `json:"llmCredentials"`
7275

7376
// +kubebuilder:validation:Optional
77+
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="TLS CA Certificate Bundle"
7478
// Configmap name containing a CA Certificates bundle
7579
TLSCACertBundle string `json:"tlsCACertBundle"`
7680

bundle/manifests/lightspeed.openstack.org_openstacklightspeeds.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ spec:
7272
type: string
7373
llmCredentials:
7474
description: |-
75-
Secret name containing API token for the LLMEndpoint. The key for the field
76-
in the secret that holds the token should be "apitoken".
75+
Secret name containing API token for the LLMEndpoint. The secret must contain
76+
a field named "apitoken" which holds the token value.
7777
type: string
7878
llmDeploymentName:
7979
description: Deployment name for LLM providers that require it (e.g.,

bundle/manifests/openstack-lightspeed-operator.clusterserviceversion.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ metadata:
2525
]
2626
capabilities: Basic Install
2727
categories: AI/Machine Learning
28-
createdAt: "2026-02-19T12:53:35Z"
28+
createdAt: "2026-02-19T13:45:56Z"
2929
description: AI-powered virtual assistant for Red Hat OpenStack Services on OpenShift
3030
features.operators.openshift.io/cnf: "false"
3131
features.operators.openshift.io/cni: "false"
@@ -66,9 +66,23 @@ spec:
6666
name: cluster
6767
version: v1alpha1
6868
specDescriptors:
69+
- description: |-
70+
Secret name containing API token for the LLMEndpoint. The secret must contain
71+
a field named "apitoken" which holds the token value.
72+
displayName: LLM Credentials Secret
73+
path: llmCredentials
74+
- description: URL pointing to the LLM
75+
displayName: LLM Endpoint
76+
path: llmEndpoint
6977
- description: Type of the provider serving the LLM
7078
displayName: Provider Type
7179
path: llmEndpointType
80+
- description: Name of the model to use at the API endpoint provided in LLMEndpoint
81+
displayName: Model Name
82+
path: modelName
83+
- description: Configmap name containing a CA Certificates bundle
84+
displayName: TLS CA Certificate Bundle
85+
path: tlsCACertBundle
7286
version: v1beta1
7387
description: |-
7488
OpenStack Lightspeed is a generative AI-based virtual assistant for Red Hat OpenStack Services on OpenShift (RHOSO) users which integrates into the OpenShift Lightspeed.

config/crd/bases/lightspeed.openstack.org_openstacklightspeeds.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ spec:
7272
type: string
7373
llmCredentials:
7474
description: |-
75-
Secret name containing API token for the LLMEndpoint. The key for the field
76-
in the secret that holds the token should be "apitoken".
75+
Secret name containing API token for the LLMEndpoint. The secret must contain
76+
a field named "apitoken" which holds the token value.
7777
type: string
7878
llmDeploymentName:
7979
description: Deployment name for LLM providers that require it (e.g.,

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,23 @@ spec:
4343
name: cluster
4444
version: v1alpha1
4545
specDescriptors:
46+
- description: |-
47+
Secret name containing API token for the LLMEndpoint. The secret must contain
48+
a field named "apitoken" which holds the token value.
49+
displayName: LLM Credentials Secret
50+
path: llmCredentials
51+
- description: URL pointing to the LLM
52+
displayName: LLM Endpoint
53+
path: llmEndpoint
4654
- description: Type of the provider serving the LLM
4755
displayName: Provider Type
4856
path: llmEndpointType
57+
- description: Name of the model to use at the API endpoint provided in LLMEndpoint
58+
displayName: Model Name
59+
path: modelName
60+
- description: Configmap name containing a CA Certificates bundle
61+
displayName: TLS CA Certificate Bundle
62+
path: tlsCACertBundle
4963
version: v1beta1
5064
description: |-
5165
OpenStack Lightspeed is a generative AI-based virtual assistant for Red Hat OpenStack Services on OpenShift (RHOSO) users which integrates into the OpenShift Lightspeed.

0 commit comments

Comments
 (0)