ricardozanini commented on code in PR #287: URL: https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/287#discussion_r1383715945
########## api/v1alpha08/sonataflowplatform_services_types.go: ########## @@ -0,0 +1,96 @@ +// Copyright 2023 Red Hat, Inc. and/or its affiliates +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha08 + +// ServicesPlatformSpec describes the desired service configuration for "prod" workflows. +type ServicesPlatformSpec struct { + // Deploys the Data Index service for use by "prod" profile workflows. + // +optional + DataIndex *ServicesPodTemplateSpec `json:"dataIndex,omitempty"` +} + +// ServicesPodTemplateSpec describes the desired custom Kubernetes PodTemplate definition for the deployed SonataflowPlatform services. +// +// The ContainerSpec describes the container where the actual service is running. It will override any default definitions. +// For example, to override the image one can use `.spec.services.dataIndex.container.image = my/image:tag`. +type ServicesPodTemplateSpec struct { Review Comment: Sorry @tchughesiv but I don't think we should mix the `PodSpec` with other info such as `Enabled` and `Persistence`. My suggestions: ```go type ServiceSpec struct { PodTemplate PodSpec `json:"podTemplate,omitempty"` Enabled *bool `json:"enabled,omitempty"` Persistence *PersistenceOptions `json:"persistence,omitempty"` } ``` Then we should have something like `.spec.services.dataIndex.podTemplate` and `.spec.services.dataIndex.persistence`. We have a clear separation of concerns and reuse `ServiceSpec` later in jobs service. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
