Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kie-issues #1217 - Replace quay.io with docker.io #3525

Merged
merged 2 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -381,5 +381,5 @@ String getWorkflowCommonDeploymentPath() {
}

String getDataIndexEphemeralReleaseImage() {
return "quay.io/kiegroup/kogito-data-index-ephemeral:${util.getMajorMinorVersion(getProjectVersion())}"
return "docker.io/apache/incubator-kie-kogito-data-index-ephemeral:${util.getMajorMinorVersion(getProjectVersion())}"
}
6 changes: 3 additions & 3 deletions .ci/jenkins/Jenkinsfile.setup-branch
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import org.jenkinsci.plugins.workflow.libs.Library
import org.kie.jenkins.MavenCommand

droolsRepo = 'incubator-kie-drools'
dataIndexEphemeralImageName = 'quay.io/kiegroup/kogito-data-index-ephemeral'
dataIndexEphemeralImageName = 'docker.io/apache/incubator-kie-kogito-data-index-ephemeral'

pipeline {
agent {
Expand Down Expand Up @@ -213,11 +213,11 @@ String getWorkflowCommonDeploymentRelativePath() {

String getDataIndexEphemeralImage() {
if (isMainBranch()) {
return "${dataIndexEphemeralImageName}-nightly:latest"
return "${dataIndexEphemeralImageName}:main"
}
String version = getKogitoVersion()
if (version.endsWith('-SNAPSHOT')) {
return "${dataIndexEphemeralImageName}-nightly:${util.getMajorMinorVersion(version)}"
return "${dataIndexEphemeralImageName}:${util.getMajorMinorVersion(version)}"
}
return "${dataIndexEphemeralImageName}:${util.getMajorMinorVersion(version)}"
Comment on lines 219 to 222
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs adjustment.. For the main branch, the tag would be main, that's fine. But when the branch is not main, we actually agreed to use the branch name to represent the stream, so the tag of this image would be 10.0.x. Now when we're doing an ACTUAL release, meaning versions does not end with -SNAPSHOT, then that's when we're supposed to use getMajorMinor().. Let me know if I'm missing something.

Copy link
Contributor

@tiagobento tiagobento May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In practice:

if version ends in -SNAPSHOT
   tagVersion = branch name
else
   tagVersion = getMajorMinor(...)

Copy link
Contributor

@tiagobento tiagobento May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With that said, this is not something that should only be done on the deploy job, as the code itself needs to reflect that, so people building locally and developing will have the same behavior. I guess the best solution would be calling:

mvn versions:set-property -Dproperty=data-index-ephemeral.image -DnewVersion=<new-value> on this module during commits D and R, as per our release procedure described here: https://docs.google.com/document/d/1t-08b970i9PMBy-TSM64x0RUH46pzwnIhEi-LVeL0lg/edit

This way, the deployment CI doesn't need to alter this property when publishing, and the build from source is always accurate.

Better yet would be creating a new property to hold only have the tagVersion, not the full tag of the image. This new property (E.g., data-index-ephemeral.image.tagVersion) can then be used to compose the existing data-index-ephemeral.image property, like docker.io/apache/incubator-kie-kogito-data-index-ephemeral:${data-index-ephemeral.image.tagVersion}.

Sorry for dumping the entire reasoning here :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tiagobento I think we need another PR targeting CI changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
spec:
containers:
- name: example-deployment-no-service
image: quay.io/kiegroup/process-quarkus-example:latest
image: docker.io/namespace/bananas:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
spec:
containers:
- name: example-deployment-with-service
image: quay.io/kiegroup/process-quarkus-example:latest
image: docker.io/namespace/bananas:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
defaultMode: 420
containers:
- name: example-deployment-no-service
image: quay.io/kiegroup/process-quarkus-example:latest
image: docker.io/namespace/bananas:latest
ports:
- containerPort: 8080
protocol: TCP
Expand Down Expand Up @@ -121,6 +121,6 @@ status:
lastState: {}
ready: true
restartCount: 0
image: quay.io/kiegroup/process-quarkus-example:latest
image: docker.io/namespace/bananas:latest
started: true
qosClass: BestEffort
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
spec:
containers:
- name: example-deployment-no-service
image: quay.io/kiegroup/process-quarkus-example:latest
image: docker.io/namespace/bananas:latest
ports:
- containerPort: 8080
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
spec:
containers:
- name: example-dc-no-service
image: quay.io/kiegroup/process-quarkus-example:latest
image: docker.io/namespace/bananas:latest
ports:
- containerPort: 8080
name: web
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
spec:
containers:
- name: example-dc-with-service
image: quay.io/kiegroup/process-quarkus-example:latest
image: docker.io/namespace/bananas:latest
ports:
- containerPort: 8080
name: http
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spec:
readOnly: true
mountPath: /var/run/secrets/kubernetes.io/serviceaccount
terminationMessagePolicy: File
image: 'quay.io/kiegroup/process-quarkus-example:latest'
image: 'docker.io/namespace/bananas:latest'
serviceAccount: default
volumes:
- name: kube-api-access-mg9n9
Expand Down Expand Up @@ -149,5 +149,5 @@ status:
state:
running:
startedAt: '2022-08-22T17:30:29Z'
image: 'quay.io/kiegroup/process-quarkus-example:latest'
image: 'docker.io/namespace/bananas:latest'
qosClass: BestEffort
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ metadata:
openshift.io/deployment.status-reason: config change
openshift.io/deployment.replicas: '1'
openshift.io/encoded-deployment-config: >
{"kind":"DeploymentConfig","apiVersion":"apps.openshift.io/v1","metadata":{"name":"example-dc-no-service","namespace":"serverless-workflow-greeting-quarkus","uid":"a01d76e9-6b3a-48bf-8224-acb9de3c4ca0","resourceVersion":"1127454401","generation":1,"creationTimestamp":"2022-08-22T17:30:09Z","labels":{"app":"example-dc-no-service"},"managedFields":[{"manager":"Mozilla","operation":"Update","apiVersion":"apps.openshift.io/v1","time":"2022-08-22T17:30:09Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:app":{}}},"f:spec":{"f:replicas":{},"f:selector":{".":{},"f:app":{}},"f:strategy":{"f:activeDeadlineSeconds":{},"f:rollingParams":{".":{},"f:intervalSeconds":{},"f:maxSurge":{},"f:maxUnavailable":{},"f:timeoutSeconds":{},"f:updatePeriodSeconds":{}},"f:type":{}},"f:template":{".":{},"f:metadata":{".":{},"f:creationTimestamp":{},"f:labels":{".":{},"f:app":{}}},"f:spec":{".":{},"f:containers":{".":{},"k:{\"name\":\"example-dc-no-service\"}":{".":{},"f:image":{},"f:imagePullPolicy":{},"f:name":{},"f:ports":{".":{},"k:{\"containerPort\":8009,\"protocol\":\"TCP\"}":{".":{},"f:containerPort":{},"f:name":{},"f:protocol":{}},"k:{\"containerPort\":8080,\"protocol\":\"TCP\"}":{".":{},"f:containerPort":{},"f:name":{},"f:protocol":{}}},"f:resources":{},"f:terminationMessagePath":{},"f:terminationMessagePolicy":{}}},"f:dnsPolicy":{},"f:restartPolicy":{},"f:schedulerName":{},"f:securityContext":{},"f:terminationGracePeriodSeconds":{}}},"f:triggers":{}}}},{"manager":"openshift-controller-manager","operation":"Update","apiVersion":"apps.openshift.io/v1","time":"2022-08-22T17:30:09Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:details":{".":{},"f:causes":{},"f:message":{}},"f:latestVersion":{}}},"subresource":"status"}]},"spec":{"strategy":{"type":"Rolling","rollingParams":{"updatePeriodSeconds":1,"intervalSeconds":1,"timeoutSeconds":600,"maxUnavailable":"25%","maxSurge":"25%"},"resources":{},"activeDeadlineSeconds":21600},"triggers":[{"type":"ConfigChange"}],"replicas":1,"revisionHistoryLimit":10,"test":false,"selector":{"app":"example-dc-no-service"},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"example-dc-no-service"}},"spec":{"containers":[{"name":"example-dc-no-service","image":"quay.io/kiegroup/process-quarkus-example:latest","ports":[{"name":"http","containerPort":8080,"protocol":"TCP"},{"name":"another-http","containerPort":8009,"protocol":"TCP"}],"resources":{},"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","securityContext":{},"schedulerName":"default-scheduler"}}},"status":{"latestVersion":1,"observedGeneration":0,"replicas":0,"updatedReplicas":0,"availableReplicas":0,"unavailableReplicas":0,"details":{"message":"config
{"kind":"DeploymentConfig","apiVersion":"apps.openshift.io/v1","metadata":{"name":"example-dc-no-service","namespace":"serverless-workflow-greeting-quarkus","uid":"a01d76e9-6b3a-48bf-8224-acb9de3c4ca0","resourceVersion":"1127454401","generation":1,"creationTimestamp":"2022-08-22T17:30:09Z","labels":{"app":"example-dc-no-service"},"managedFields":[{"manager":"Mozilla","operation":"Update","apiVersion":"apps.openshift.io/v1","time":"2022-08-22T17:30:09Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:app":{}}},"f:spec":{"f:replicas":{},"f:selector":{".":{},"f:app":{}},"f:strategy":{"f:activeDeadlineSeconds":{},"f:rollingParams":{".":{},"f:intervalSeconds":{},"f:maxSurge":{},"f:maxUnavailable":{},"f:timeoutSeconds":{},"f:updatePeriodSeconds":{}},"f:type":{}},"f:template":{".":{},"f:metadata":{".":{},"f:creationTimestamp":{},"f:labels":{".":{},"f:app":{}}},"f:spec":{".":{},"f:containers":{".":{},"k:{\"name\":\"example-dc-no-service\"}":{".":{},"f:image":{},"f:imagePullPolicy":{},"f:name":{},"f:ports":{".":{},"k:{\"containerPort\":8009,\"protocol\":\"TCP\"}":{".":{},"f:containerPort":{},"f:name":{},"f:protocol":{}},"k:{\"containerPort\":8080,\"protocol\":\"TCP\"}":{".":{},"f:containerPort":{},"f:name":{},"f:protocol":{}}},"f:resources":{},"f:terminationMessagePath":{},"f:terminationMessagePolicy":{}}},"f:dnsPolicy":{},"f:restartPolicy":{},"f:schedulerName":{},"f:securityContext":{},"f:terminationGracePeriodSeconds":{}}},"f:triggers":{}}}},{"manager":"openshift-controller-manager","operation":"Update","apiVersion":"apps.openshift.io/v1","time":"2022-08-22T17:30:09Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:details":{".":{},"f:causes":{},"f:message":{}},"f:latestVersion":{}}},"subresource":"status"}]},"spec":{"strategy":{"type":"Rolling","rollingParams":{"updatePeriodSeconds":1,"intervalSeconds":1,"timeoutSeconds":600,"maxUnavailable":"25%","maxSurge":"25%"},"resources":{},"activeDeadlineSeconds":21600},"triggers":[{"type":"ConfigChange"}],"replicas":1,"revisionHistoryLimit":10,"test":false,"selector":{"app":"example-dc-no-service"},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"example-dc-no-service"}},"spec":{"containers":[{"name":"example-dc-no-service","image":"docker.io/namespace/bananas:latest","ports":[{"name":"http","containerPort":8080,"protocol":"TCP"},{"name":"another-http","containerPort":8009,"protocol":"TCP"}],"resources":{},"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","securityContext":{},"schedulerName":"default-scheduler"}}},"status":{"latestVersion":1,"observedGeneration":0,"replicas":0,"updatedReplicas":0,"availableReplicas":0,"unavailableReplicas":0,"details":{"message":"config
change","causes":[{"type":"ConfigChange"}]}}}
openshift.io/deployer-pod.name: example-dc-no-service-1-deploy
resourceVersion: '1127455589'
Expand Down Expand Up @@ -64,7 +64,7 @@ spec:
spec:
containers:
- name: example-dc-no-service
image: 'quay.io/kiegroup/process-quarkus-example:latest'
image: 'docker.io/namespace/bananas:latest'
ports:
- name: http
containerPort: 8080
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ metadata:
spec:
containers:
- name: pod-no-service-custom-port
image: quay.io/kiegroup/process-quarkus-example:latest
image: docker.io/namespace/bananas:latest
imagePullPolicy: Never
ports:
- name: http
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ metadata:
spec:
containers:
- name: process-quarkus-example-pod-no-service
image: quay.io/kiegroup/process-quarkus-example:latest
image: docker.io/namespace/bananas:latest
imagePullPolicy: Never
ports:
- name: http
Expand Down Expand Up @@ -64,5 +64,5 @@ status:
lastState: {}
ready: true
restartCount: 0
image: quay.io/kiegroup/process-quarkus-example:latest
image: docker.io/namespace/bananas:latest
started: true
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
spec:
containers:
- name: process-quarkus-example-statefulset-no-service
image: quay.io/kiegroup/process-quarkus-example:latest
image: docker.io/namespace/bananas:latest
ports:
- containerPort: 8080
name: http
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
defaultMode: 420
containers:
- name: example-statefulset-without-service
image: quay.io/kiegroup/process-quarkus-example:latest
image: docker.io/namespace/bananas:latest
ports:
- name: http
containerPort: 8080
Expand Down Expand Up @@ -126,6 +126,6 @@ status:
lastState: {}
ready: true
restartCount: 0
image: quay.io/kiegroup/process-quarkus-example:latest
image: docker.io/namespace/bananas:latest
started: true
qosClass: BestEffort
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
spec:
containers:
- name: example-statefulset-with-service
image: quay.io/kiegroup/process-quarkus-example:latest
image: docker.io/namespace/bananas:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
# under the License.
#

quarkus.kogito.dev-services-trusty.image-name=quay.io/kiegroup/kogito-trusty-postgresql:${version.org.kie.kogito.trusty-service-postgresql}
quarkus.kogito.dev-services-trusty.image-name=docker.io/apache/incubator-kie-kogito-trusty-postgresql:${version.org.kie.kogito.trusty-service-postgresql}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where this image is published?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not. We've deprecated it. Hence, we can either keep this image here for ubiquity, keep the outdated, or remove this addon for good. I'd rather take this decision for the maintainers of this addon. @gitgabrio do you know?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

k, thank you for the clarifications.

I would like to preserve as much as possible the tracing decision, but it has to adjust to remove the image reference that has been removed.

@gitgabrio would be possible to adjust the code to avoid use the image?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this property is for the devservice. We should remove the devservice or review it. I recommend doing so in another PR. Waiting for @gitgabrio inputs. :D

Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ mp.messaging.outgoing.kogito-tracing-model.topic=kogito-tracing-model
mp.messaging.outgoing.kogito-tracing-model.value.serializer=org.apache.kafka.common.serialization.StringSerializer
mp.messaging.outgoing.kogito-tracing-model.auto.offset.reset=earliest

quarkus.kogito.dev-services-trusty.image-name=quay.io/kiegroup/kogito-trusty-postgresql:latest
quarkus.kogito.dev-services-trusty.image-name=docker.io/apache/incubator-kie-kogito-trusty-postgresql:latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't find this image source; mind help locate it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

#quarkus.kogito.dev-services-trusty.image-name=org.kie.kogito/trusty-service-postgresql:2.0.0-SNAPSHOT
quarkus.kogito.dev-services-trusty.port-used-by-test=-1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<name>Kogito :: Quarkus Workflow Extension Common :: Deployment</name>

<properties>
<data-index-ephemeral.image>quay.io/kiegroup/kogito-data-index-ephemeral-nightly:latest</data-index-ephemeral.image>
<data-index-ephemeral.image>docker.io/apache/incubator-kie-kogito-data-index-ephemeral:main</data-index-ephemeral.image>
<java.module.name>org.kie.kogito.quarkus.workflow.deployment</java.module.name>
</properties>

Expand Down
Loading