This is an automated email from the ASF dual-hosted git repository.

wmedvedeo pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-serverless-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 5c009337 kie-kogito-serverless-operator-502: Align the operator to use 
data-index and jobs-service weekly images (#503)
5c009337 is described below

commit 5c00933758d0bbcdee1af55abd8b033de0ddbbed
Author: Walter Medvedeo <[email protected]>
AuthorDate: Wed Jul 17 14:49:54 2024 +0200

    kie-kogito-serverless-operator-502: Align the operator to use data-index 
and jobs-service weekly images (#503)
---
 controllers/platform/services/services.go                      |  4 ++--
 .../sonataflow.org_v1alpha08_sonataflow-simpleops.yaml         |  4 +++-
 version/version.go                                             | 10 +++++++++-
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/controllers/platform/services/services.go 
b/controllers/platform/services/services.go
index 50baa849..58e068da 100644
--- a/controllers/platform/services/services.go
+++ b/controllers/platform/services/services.go
@@ -111,7 +111,7 @@ func (d DataIndexHandler) 
GetServiceImageName(persistenceType constants.Persiste
                return cfg.GetCfg().DataIndexEphemeralImageTag
        }
        // returns 
"docker.io/apache/incubator-kie-kogito-data-index-<persistence_layer>:<tag>"
-       return fmt.Sprintf("%s-%s-%s:%s", constants.ImageNamePrefix, 
constants.DataIndexName, persistenceType.String(), version.GetTagVersion())
+       return fmt.Sprintf("%s-%s-%s:%s", constants.ImageNamePrefix, 
constants.DataIndexName, persistenceType.String(), 
version.GetServiceTagVersion())
 }
 
 func (d DataIndexHandler) GetServiceName() string {
@@ -273,7 +273,7 @@ func (j JobServiceHandler) 
GetServiceImageName(persistenceType constants.Persist
                return cfg.GetCfg().JobsServiceEphemeralImageTag
        }
        // returns 
"docker.io/apache/incubator-kie-kogito-jobs-service-<persistece_layer>:<tag>"
-       return fmt.Sprintf("%s-%s-%s:%s", constants.ImageNamePrefix, 
constants.JobServiceName, persistenceType.String(), version.GetTagVersion())
+       return fmt.Sprintf("%s-%s-%s:%s", constants.ImageNamePrefix, 
constants.JobServiceName, persistenceType.String(), 
version.GetServiceTagVersion())
 }
 
 func (j JobServiceHandler) GetServiceName() string {
diff --git a/test/testdata/sonataflow.org_v1alpha08_sonataflow-simpleops.yaml 
b/test/testdata/sonataflow.org_v1alpha08_sonataflow-simpleops.yaml
index 8c8de2a8..48711f5f 100644
--- a/test/testdata/sonataflow.org_v1alpha08_sonataflow-simpleops.yaml
+++ b/test/testdata/sonataflow.org_v1alpha08_sonataflow-simpleops.yaml
@@ -25,7 +25,9 @@ metadata:
 spec:
   podTemplate:
     container:
-      image: docker.io/apache/incubator-kie-sonataflow-minimal-example:latest
+      # TODO use 
docker.io/apache/incubator-kie-sonataflow-minimal-example:latest
+      # when we complete 
https://github.com/apache/incubator-kie-kogito-serverless-operator/issues/504
+      image: quay.io/kiegroup/sonataflow-minimal-example:latest
   flow:
     start: HelloWorld
     states:
diff --git a/version/version.go b/version/version.go
index 7321fb27..eb0eb353 100644
--- a/version/version.go
+++ b/version/version.go
@@ -30,7 +30,8 @@ const (
        // This tag must reflect an existing tag in the registry. In 
development, must follow the git branch naming.
        // When released, this version should reflect the `major.minor` version 
in the registry.
        // For example, docker.io/apache/incubator-kie-sonataflow-operator:10.0
-       tagVersion = "main"
+       tagVersion        = "main"
+       serviceTagVersion = "weekly-latest"
 )
 
 // GetOperatorVersion gets the current binary version of the operator. Do not 
use it to compose image tags!
@@ -42,3 +43,10 @@ func GetOperatorVersion() string {
 func GetTagVersion() string {
        return tagVersion
 }
+
+// GetServiceTagVersion gets the current tag version for the service images.
+// TODO, unify all with tagVersion="main", when "main" tag is produced for DI 
and JS.
+// Right now, Apache community only produces "weekly-latest", and "timestamped 
tags" for these services.
+func GetServiceTagVersion() string {
+       return serviceTagVersion
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to