jordigilh commented on code in PR #311: URL: https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/311#discussion_r1424403721
########## controllers/platform/services/services.go: ########## @@ -0,0 +1,298 @@ +// 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 services + +import ( + "fmt" + "strconv" + + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + + operatorapi "github.com/apache/incubator-kie-kogito-serverless-operator/api/v1alpha08" + "github.com/apache/incubator-kie-kogito-serverless-operator/controllers/profiles/common/constants" + + "github.com/apache/incubator-kie-kogito-serverless-operator/version" + "github.com/imdario/mergo" +) + +type Platform interface { + // GetContainerName returns the name of the service's container in the deployment. + GetContainerName() string + // GetServiceImageName returns the image name of the service's container. It takes in the service and persistence types and returns a string + // that contains the FQDN of the image, including the tag. + GetServiceImageName(persistenceName string) string + // GetServiceName returns the name of the kubernetes service prefixed with the platform name + GetServiceName() string + // GetServiceCmName returns the name of the configmap associated to the service + GetServiceCmName() string + // GetEnvironmentVariables returns the env variables to be injected to the service container + GetEnvironmentVariables() []corev1.EnvVar + // GetResourceLimits returns the pod's memory and CPU resource requirements + // Values for job service taken from + // https://github.com/parodos-dev/orchestrator-helm-chart/blob/52d09eda56fdbed3060782df29847c97f172600f/charts/orchestrator/values.yaml#L68-L72 + GetPodResourceRequirements() corev1.ResourceRequirements + // GetReplicaCountForService Returns the default pod replica count for the given service + GetReplicaCount() int32 Review Comment: ok so it should always set to 1 regardless of what it's elswhere defined, right? -- 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]
