Skip to content

Commit

Permalink
[387] fix csv scorecard issues (#388)
Browse files Browse the repository at this point in the history
Signed-off-by: Tommy Hughes <[email protected]>
  • Loading branch information
tchughesiv authored Feb 8, 2024
1 parent 8e212f5 commit 622b5ee
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 3 deletions.
3 changes: 3 additions & 0 deletions api/v1alpha08/sonataflowclusterplatform_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

Expand Down Expand Up @@ -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"`
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha08/sonataflowplatform_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

Expand Down Expand Up @@ -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"`
}

Expand Down
19 changes: 19 additions & 0 deletions bundle/manifests/sonataflow-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 622b5ee

Please sign in to comment.