ricardozanini commented on code in PR #311:
URL:
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/311#discussion_r1408252335
##########
controllers/profiles/common/app_properties.go:
##########
@@ -45,27 +45,59 @@ const (
kafkaSmallRyeHealthProperty =
"quarkus.smallrye-health.check.\"io.quarkus.kafka.client.health.KafkaHealthCheck\".enabled"
dataIndexServiceUrlProtocol = "http"
- DataIndexImageBase = "quay.io/kiegroup/kogito-data-index-"
- DataIndexName = "data-index-service"
-
- PersistenceTypeEphemeral = "ephemeral"
- PersistenceTypePostgressql = "postgresql"
-
+ imageNamePrefix = "quay.io/kiegroup/kogito"
+ DataIndexServiceName = "data-index-service"
+ DataIndexName = "data-index"
+ JobServiceName = "jobs-service"
+ ImageTag = "1.44"
Review Comment:
Please use this instead:
https://github.com/apache/incubator-kie-kogito-serverless-operator/blob/main/version/version.go#L20
The `main` branch must use the nightly images:
https://quay.io/repository/kiegroup/kogito-jobs-service-postgresql-nightly?tab=tags
So if `version.IsSnapshot()`, we use a nightly image version with `latest`
tag, otherwise `version.GetMajorMinor()`.
Our CI updates that file when branching and releasing, hence we must not fix
the version in the code base.
##########
controllers/profiles/common/app_properties.go:
##########
@@ -45,27 +45,59 @@ const (
kafkaSmallRyeHealthProperty =
"quarkus.smallrye-health.check.\"io.quarkus.kafka.client.health.KafkaHealthCheck\".enabled"
dataIndexServiceUrlProtocol = "http"
- DataIndexImageBase = "quay.io/kiegroup/kogito-data-index-"
- DataIndexName = "data-index-service"
-
- PersistenceTypeEphemeral = "ephemeral"
- PersistenceTypePostgressql = "postgresql"
-
+ imageNamePrefix = "quay.io/kiegroup/kogito"
+ DataIndexServiceName = "data-index-service"
+ DataIndexName = "data-index"
+ JobServiceName = "jobs-service"
+ ImageTag = "1.44"
+ PersistenceTypeEphemeral = "ephemeral"
+ PersistenceTypePostgressql = "postgresql"
microprofileServiceCatalogPropertyPrefix =
"org.kie.kogito.addons.discovery."
discoveryLikePropertyPattern =
"^\\${(kubernetes|knative|openshift):(.*)}$"
)
-var immutableApplicationProperties = "quarkus.http.port=" +
DefaultHTTPWorkflowPortIntStr.String() + "\n" +
- "quarkus.http.host=0.0.0.0\n" +
- // We disable the Knative health checks to not block the dev pod to run
if Knative objects are not available
- // See:
https://kiegroup.github.io/kogito-docs/serverlessworkflow/latest/eventing/consume-produce-events-with-knative-eventing.html#ref-knative-eventing-add-on-source-configuration
- "org.kie.kogito.addons.knative.eventing.health-enabled=false\n" +
- "quarkus.devservices.enabled=false\n" +
- "quarkus.kogito.devservices.enabled=false\n"
+var (
+ immutableApplicationProperties = "quarkus.http.port=" +
DefaultHTTPWorkflowPortIntStr.String() + "\n" +
+ "quarkus.http.host=0.0.0.0\n" +
+ // We disable the Knative health checks to not block the dev
pod to run if Knative objects are not available
+ // See:
https://kiegroup.github.io/kogito-docs/serverlessworkflow/latest/eventing/consume-produce-events-with-knative-eventing.html#ref-knative-eventing-add-on-source-configuration
+ "org.kie.kogito.addons.knative.eventing.health-enabled=false\n"
+
+ "quarkus.devservices.enabled=false\n" +
+ "quarkus.kogito.devservices.enabled=false\n"
+
+ discoveryLikePropertyExpr =
regexp.MustCompile(discoveryLikePropertyPattern)
+ _ AppPropertyHandler = &appPropertyHandler{}
+)
-var discoveryLikePropertyExpr =
regexp.MustCompile(discoveryLikePropertyPattern)
+const (
+ DataIndexService = iota
+ JobService
+)
-var _ AppPropertyHandler = &appPropertyHandler{}
+// GetContainerName returns the name of the service's container in the
deployment.
+func GetContainerName(stype int) string {
+ switch stype {
+ case DataIndexService:
+ return DataIndexServiceName
+ case JobService:
+ return JobServiceName
+ }
+ return ""
+}
+
+// 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.
+func GetServiceImageName(persistenceName string, stype int) string {
Review Comment:
Same question here.
##########
controllers/profiles/common/app_properties.go:
##########
@@ -45,27 +45,59 @@ const (
kafkaSmallRyeHealthProperty =
"quarkus.smallrye-health.check.\"io.quarkus.kafka.client.health.KafkaHealthCheck\".enabled"
dataIndexServiceUrlProtocol = "http"
- DataIndexImageBase = "quay.io/kiegroup/kogito-data-index-"
- DataIndexName = "data-index-service"
-
- PersistenceTypeEphemeral = "ephemeral"
- PersistenceTypePostgressql = "postgresql"
-
+ imageNamePrefix = "quay.io/kiegroup/kogito"
+ DataIndexServiceName = "data-index-service"
+ DataIndexName = "data-index"
+ JobServiceName = "jobs-service"
+ ImageTag = "1.44"
+ PersistenceTypeEphemeral = "ephemeral"
+ PersistenceTypePostgressql = "postgresql"
microprofileServiceCatalogPropertyPrefix =
"org.kie.kogito.addons.discovery."
discoveryLikePropertyPattern =
"^\\${(kubernetes|knative|openshift):(.*)}$"
)
-var immutableApplicationProperties = "quarkus.http.port=" +
DefaultHTTPWorkflowPortIntStr.String() + "\n" +
- "quarkus.http.host=0.0.0.0\n" +
- // We disable the Knative health checks to not block the dev pod to run
if Knative objects are not available
- // See:
https://kiegroup.github.io/kogito-docs/serverlessworkflow/latest/eventing/consume-produce-events-with-knative-eventing.html#ref-knative-eventing-add-on-source-configuration
- "org.kie.kogito.addons.knative.eventing.health-enabled=false\n" +
- "quarkus.devservices.enabled=false\n" +
- "quarkus.kogito.devservices.enabled=false\n"
+var (
+ immutableApplicationProperties = "quarkus.http.port=" +
DefaultHTTPWorkflowPortIntStr.String() + "\n" +
+ "quarkus.http.host=0.0.0.0\n" +
+ // We disable the Knative health checks to not block the dev
pod to run if Knative objects are not available
+ // See:
https://kiegroup.github.io/kogito-docs/serverlessworkflow/latest/eventing/consume-produce-events-with-knative-eventing.html#ref-knative-eventing-add-on-source-configuration
+ "org.kie.kogito.addons.knative.eventing.health-enabled=false\n"
+
+ "quarkus.devservices.enabled=false\n" +
+ "quarkus.kogito.devservices.enabled=false\n"
+
+ discoveryLikePropertyExpr =
regexp.MustCompile(discoveryLikePropertyPattern)
+ _ AppPropertyHandler = &appPropertyHandler{}
+)
-var discoveryLikePropertyExpr =
regexp.MustCompile(discoveryLikePropertyPattern)
+const (
+ DataIndexService = iota
+ JobService
+)
-var _ AppPropertyHandler = &appPropertyHandler{}
+// GetContainerName returns the name of the service's container in the
deployment.
+func GetContainerName(stype int) string {
Review Comment:
Can you please type this enum? Is this function required to be exported?
--
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]