From 622b5ee7164f73449b655a6dcfa5ceac61b7f70a Mon Sep 17 00:00:00 2001 From: Tommy Hughes IV Date: Thu, 8 Feb 2024 13:15:01 -0600 Subject: [PATCH] [387] fix csv scorecard issues (#388) Signed-off-by: Tommy Hughes --- .../sonataflowclusterplatform_types.go | 3 +++ api/v1alpha08/sonataflowplatform_types.go | 2 ++ ...taflow-operator.clusterserviceversion.yaml | 19 +++++++++++++++++++ ...taflow.org_sonataflowclusterplatforms.yaml | 2 +- ...taflow.org_sonataflowclusterplatforms.yaml | 2 +- ...taflow-operator.clusterserviceversion.yaml | 19 +++++++++++++++++++ operator.yaml | 2 +- 7 files changed, 46 insertions(+), 3 deletions(-) diff --git a/api/v1alpha08/sonataflowclusterplatform_types.go b/api/v1alpha08/sonataflowclusterplatform_types.go index 4016e5072..b5063545a 100644 --- a/api/v1alpha08/sonataflowclusterplatform_types.go +++ b/api/v1alpha08/sonataflowclusterplatform_types.go @@ -28,6 +28,8 @@ const ( // SonataFlowClusterPlatformSpec defines the desired state of SonataFlowClusterPlatform type SonataFlowClusterPlatformSpec struct { + // PlatformRef defines which existing SonataFlowPlatform's supporting services should be used cluster-wide. + //+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="PlatformRef" PlatformRef SonataFlowPlatformRef `json:"platformRef"` } @@ -78,6 +80,7 @@ func (in *SonataFlowClusterPlatformStatus) IsDuplicated() bool { // +kubebuilder:printcolumn:name="Platform_NS",type=string,JSONPath=`.spec.platformRef.namespace` // +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=='Succeed')].status` // +kubebuilder:printcolumn:name="Reason",type=string,JSONPath=`.status.conditions[?(@.type=='Succeed')].reason` +// +operator-sdk:csv:customresourcedefinitions:resources={{SonataFlowPlatform,sonataflow.org/v1alpha08,"A SonataFlow Platform"}} type SonataFlowClusterPlatform struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/api/v1alpha08/sonataflowplatform_types.go b/api/v1alpha08/sonataflowplatform_types.go index 0ee7e9ab7..2a332b0d0 100644 --- a/api/v1alpha08/sonataflowplatform_types.go +++ b/api/v1alpha08/sonataflowplatform_types.go @@ -45,6 +45,7 @@ type SonataFlowPlatformSpec struct { // Only workflows without the `sonataflow.org/profile: dev` annotation will be configured to use these service(s). // Setting this will override the use of any cluster-scoped services that might be defined via `SonataFlowClusterPlatform`. // +optional + // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Services" Services *ServicesPlatformSpec `json:"services,omitempty"` } @@ -80,6 +81,7 @@ type SonataFlowPlatformStatus struct { //+operator-sdk:csv:customresourcedefinitions:type=status,displayName="info" Info map[string]string `json:"info,omitempty"` // ClusterPlatformRef information related to the (optional) active SonataFlowClusterPlatform + //+operator-sdk:csv:customresourcedefinitions:type=status,displayName="clusterPlatformRef" ClusterPlatformRef *SonataFlowClusterPlatformRefStatus `json:"clusterPlatformRef,omitempty"` } diff --git a/bundle/manifests/sonataflow-operator.clusterserviceversion.yaml b/bundle/manifests/sonataflow-operator.clusterserviceversion.yaml index 577f07565..95bceb338 100644 --- a/bundle/manifests/sonataflow-operator.clusterserviceversion.yaml +++ b/bundle/manifests/sonataflow-operator.clusterserviceversion.yaml @@ -185,7 +185,15 @@ spec: displayName: Sonata Flow Cluster Platform kind: SonataFlowClusterPlatform name: sonataflowclusterplatforms.sonataflow.org + resources: + - kind: SonataFlowPlatform + name: A SonataFlow Platform + version: sonataflow.org/v1alpha08 specDescriptors: + - description: PlatformRef defines which existing SonataFlowPlatform's supporting + services should be used cluster-wide. + displayName: PlatformRef + path: platformRef - description: Name of the SonataFlowPlatform displayName: Platform_Name path: platformRef.name @@ -236,6 +244,13 @@ spec: no build required) displayName: DevMode path: devMode + - description: 'Services attributes for deploying supporting applications like + Data Index & Job Service. Only workflows without the `sonataflow.org/profile: + dev` annotation will be configured to use these service(s). Setting this + will override the use of any cluster-scoped services that might be defined + via `SonataFlowClusterPlatform`.' + displayName: Services + path: services - description: PodTemplate describes the deployment details of this platform service instance. displayName: podTemplate @@ -249,6 +264,10 @@ spec: or OpenShift) displayName: cluster path: cluster + - description: ClusterPlatformRef information related to the (optional) active + SonataFlowClusterPlatform + displayName: clusterPlatformRef + path: clusterPlatformRef - description: Info generic information related to the build displayName: info path: info diff --git a/bundle/manifests/sonataflow.org_sonataflowclusterplatforms.yaml b/bundle/manifests/sonataflow.org_sonataflowclusterplatforms.yaml index faa83264e..0d9a7b209 100644 --- a/bundle/manifests/sonataflow.org_sonataflowclusterplatforms.yaml +++ b/bundle/manifests/sonataflow.org_sonataflowclusterplatforms.yaml @@ -50,7 +50,7 @@ spec: SonataFlowClusterPlatform properties: platformRef: - description: SonataFlowPlatformRef defines which existing SonataFlowPlatform's + description: PlatformRef defines which existing SonataFlowPlatform's supporting services should be used cluster-wide. properties: name: diff --git a/config/crd/bases/sonataflow.org_sonataflowclusterplatforms.yaml b/config/crd/bases/sonataflow.org_sonataflowclusterplatforms.yaml index a740ddea9..537d06ba6 100644 --- a/config/crd/bases/sonataflow.org_sonataflowclusterplatforms.yaml +++ b/config/crd/bases/sonataflow.org_sonataflowclusterplatforms.yaml @@ -51,7 +51,7 @@ spec: SonataFlowClusterPlatform properties: platformRef: - description: SonataFlowPlatformRef defines which existing SonataFlowPlatform's + description: PlatformRef defines which existing SonataFlowPlatform's supporting services should be used cluster-wide. properties: name: diff --git a/config/manifests/bases/sonataflow-operator.clusterserviceversion.yaml b/config/manifests/bases/sonataflow-operator.clusterserviceversion.yaml index fcd5460ea..3442b0252 100644 --- a/config/manifests/bases/sonataflow-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/sonataflow-operator.clusterserviceversion.yaml @@ -69,7 +69,15 @@ spec: displayName: Sonata Flow Cluster Platform kind: SonataFlowClusterPlatform name: sonataflowclusterplatforms.sonataflow.org + resources: + - kind: SonataFlowPlatform + name: A SonataFlow Platform + version: sonataflow.org/v1alpha08 specDescriptors: + - description: PlatformRef defines which existing SonataFlowPlatform's supporting + services should be used cluster-wide. + displayName: PlatformRef + path: platformRef - description: Name of the SonataFlowPlatform displayName: Platform_Name path: platformRef.name @@ -120,6 +128,13 @@ spec: no build required) displayName: DevMode path: devMode + - description: 'Services attributes for deploying supporting applications like + Data Index & Job Service. Only workflows without the `sonataflow.org/profile: + dev` annotation will be configured to use these service(s). Setting this + will override the use of any cluster-scoped services that might be defined + via `SonataFlowClusterPlatform`.' + displayName: Services + path: services - description: PodTemplate describes the deployment details of this platform service instance. displayName: podTemplate @@ -133,6 +148,10 @@ spec: or OpenShift) displayName: cluster path: cluster + - description: ClusterPlatformRef information related to the (optional) active + SonataFlowClusterPlatform + displayName: clusterPlatformRef + path: clusterPlatformRef - description: Info generic information related to the build displayName: info path: info diff --git a/operator.yaml b/operator.yaml index c7c538125..74247a7de 100644 --- a/operator.yaml +++ b/operator.yaml @@ -414,7 +414,7 @@ spec: SonataFlowClusterPlatform properties: platformRef: - description: SonataFlowPlatformRef defines which existing SonataFlowPlatform's + description: PlatformRef defines which existing SonataFlowPlatform's supporting services should be used cluster-wide. properties: name: