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

Add platforms annotation to kaniko task #815

Merged
merged 1 commit into from
Aug 31, 2021

Conversation

barthy1
Copy link
Member

@barthy1 barthy1 commented Aug 26, 2021

Changes

Annotation about linux/amd64,linux/s390x, and linux/ppc64le platforms was added to the latest versions of the kaniko task, as well as information which custom images to use for linux/s390x and linux/ppc64le platforms.
JQ_IMAGE parameter is introduced with default value from the existing task to be able to use custom image for non-Intel architecture.

The changes were tested for linux/amd64,linux/s390x, and linux/ppc64le platforms.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide
for more details.


@tekton-robot tekton-robot requested review from chmouel and a user August 26, 2021 12:42
@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 26, 2021
Annotation about linux/amd64,linux/s390x,linux/ppc64le platforms was
added to the latest versions of the kaniko task, as well as information
which custom images to use for linux/s390x and linux/ppc64le platforms.
JQ_IMAGE parameter is introduced with default value from the existing
tas to be able to use custom image for non-Intel architecture.

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbwsg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 26, 2021
Comment on lines +56 to +63
## Platforms

The Task can be run on `linux/amd64`, `linux/s390x` and `linux/ppc64le` platforms.

For `linux/s390x` platform specify `BUILDER_IMAGE` parameter with `gcr.io/kaniko-project/executor:s390x-9ed158c1f63a059cde4fd5f8b95af51d452d9aa7`
value and `JQ_IMAGE` parameter with `ibmcom/jq-s390x:latest` value in TaskRun or PipelineRun.

For `linux/ppc64le` platform specify `JQ_IMAGE` parameter with `ibmcom/jq-ppc64le:latest` value in TaskRun or PipelineRun.
Copy link
Member

Choose a reason for hiding this comment

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

@barthy1 this information would not be available to user who would be installing the task via tkn hub cli. Is there a way we can get an image which is a multi-arch build?

Copy link
Member Author

Choose a reason for hiding this comment

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

For kaniko image - at this moment there is no multi-arch image for all 3 platforms. I am working on it, but the problem is complex and will take some time to resolve.
For jq image we can use multi-arch one - apteno/alpine-jq, the default stedolan/jq has only linux/amd64 support and community is not interested to build multi-arch version.

In general I agree that search via tkn hub won't show platform specific information, however at least user can find it at hub UI, tkn hub task details and catalog task description. At this moment I don't see any way to show something like that in standard cli search, except probably adding * after platforms specification and suggesting check the task documentation before usage :(
Do you have any ideas?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thinking about it more, also remembered some ideas suggested in this area:

Copy link
Member Author

Choose a reason for hiding this comment

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

@vinamra28 would it be ok for you to resolve this issue step be step?
I mean first step would be just document the differences between platforms in documentation, next step to either somehow generate multi-arch image or define task differently.

Copy link
Member

Choose a reason for hiding this comment

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

yeah will be good for first iteration 👍

@chmouel
Copy link
Member

chmouel commented Aug 30, 2021

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 30, 2021
@vinamra28
Copy link
Member

/test .*

@vdemeester
Copy link
Member

/test pull-catalog-catlin-lint

1 similar comment
@vdemeester
Copy link
Member

/test pull-catalog-catlin-lint

@vdemeester
Copy link
Member

task check-name-match has failed: "step-check-name" exited with code 2 (image: "docker-pullable://alpine@sha256:e1c082e3d3c45cccac829840a25941e679c25d438cc8412c2fa221cf1a824e6a"); for logs run: kubectl -n tekton-ci logs pull-catalog-catlin-run-ssmzq-check-name-match-f85nx-pod-8nl2t -c step-check-name

[check-name] + set -o pipefail
[check-name] + printf passed
[check-name] + '[[' '/test pull-catalog-catlin-lint
[check-name]
[check-name] ' '=='  ]]
[check-name] /tekton/scripts/script-0-8rgz4: line 19: syntax error: unexpected "|"

🤔

@vdemeester vdemeester closed this Aug 30, 2021
@vdemeester vdemeester reopened this Aug 30, 2021
@vinamra28
Copy link
Member

/test .*

@tekton-robot
Copy link

Catlin Output

FILE: task/kaniko/0.4/kaniko.yaml
WARN : Step "build-and-push" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "digest-to-results" uses image "$(params.JQ_IMAGE)" that contains variables; skipping validation

Catlin script lint Output

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In kaniko-digest-to-results line 2:
cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE-DIGEST
    ^---------------^ SC2046: Quote this to prevent word splitting.
    ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2002 -- Useless cat. Consider 'cmd < file...

@PuneetPunamiya
Copy link
Member

/lgtm

@tekton-robot tekton-robot merged commit 05b2246 into tektoncd:main Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants