Skip to content

Commit

Permalink
kie-kogito-serverless-operator-502: Align the operator to use data-in…
Browse files Browse the repository at this point in the history
…dex and jobs-service weekly images (apache#503)
  • Loading branch information
wmedvede authored and rgdoliveira committed Jul 17, 2024
1 parent 0fdd9d6 commit 2e59c54
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions controllers/platform/services/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 9 additions & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand All @@ -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
}

0 comments on commit 2e59c54

Please sign in to comment.