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

images: Use crane for pushing release images instead of docker #3494

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

claudiubelu
Copy link
Contributor

What type of PR is this?

What this PR does / why we need it:

Currently, we're loading the images into docker, retagging them, and then push them onto the registry.

This workflow is incompatible with Windows images, as docker load does not work for them, resulting in the following error:

cannot load windows image on linux

However, crane does not load the image, it just pushes it directly with the given tag. This will allow us to push any Windows image we might have (e.g.: Windows kube-proxy image).

Which issue(s) this PR fixes:

Related: kubernetes/kubernetes@7f04e49

Special notes for your reviewer:

Does this PR introduce a user-facing change?


@k8s-ci-robot
Copy link
Contributor

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot
Copy link
Contributor

@claudiubelu: Adding label: do-not-merge/blocked-paths because PR changes a protected file.

Reasons for blocking this PR:

[Changes to push-build.sh will immediately affect the Kubernetes CI. This PR must be explicitly approved by SIG Release repo admins.]

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added do-not-merge/blocked-paths Indicates that a PR should not merge because it touches files in blocked paths. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority labels Mar 7, 2024
@k8s-ci-robot k8s-ci-robot added the area/release-eng Issues or PRs related to the Release Engineering subproject label Mar 7, 2024
@k8s-ci-robot k8s-ci-robot requested a review from jrsapi March 7, 2024 10:14
@k8s-ci-robot k8s-ci-robot added sig/release Categorizes an issue or PR as relevant to SIG Release. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 7, 2024
@saschagrunert
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Mar 7, 2024
@claudiubelu
Copy link
Contributor Author

/test pull-release-cluster-up

Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

thanks for the pr

a few comments

push-build.sh Outdated Show resolved Hide resolved
push-build.sh Outdated Show resolved Hide resolved
push-build.sh Outdated Show resolved Hide resolved
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: claudiubelu
Once this PR has been reviewed and has the lgtm label, please ask for approval from cpanato. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 25, 2024
Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

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

Some nits to consider. Thank you for this PR!

push-build.sh Outdated Show resolved Hide resolved
push-build.sh Outdated
echo "Installing crane..."
CRANE_VERSION="v0.19.1"
BASE_URL="https://github.com/google/go-containerregistry/releases/download"
TAR_NAME="go-containerregistry_Linux_x86_64.tar.gz"
Copy link
Member

Choose a reason for hiding this comment

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

Are we sure that this script is only used on amd64 systems? cc @kubernetes/release-engineering

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, changed to TAR_NAME="go-containerregistry_Linux_$(uname -p).tar.gz", which should include the processor type.

push-build.sh Outdated Show resolved Hide resolved
push-build.sh Outdated Show resolved Hide resolved
Currently, we're loading the images into docker, retagging them, and
then push them onto the registry.

This workflow is incompatible with Windows images, as docker load does
not work for them, resulting in the following error:

cannot load windows image on linux

However, crane does not load the image, it just pushes it directly with
the given tag. This will allow us to push any Windows image we might have
(e.g.: Windows kube-proxy image).
@claudiubelu
Copy link
Contributor Author

/test pull-release-cluster-up

@claudiubelu
Copy link
Contributor Author

Any idea why the pull-release-cluster-up job is failing? The logs do not reveal much.

@saschagrunert
Copy link
Member

/retest

@k8s-ci-robot
Copy link
Contributor

@claudiubelu: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-release-cluster-up d04801a link true /test pull-release-cluster-up

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@saschagrunert
Copy link
Member

saschagrunert commented Apr 26, 2024

This job seems to have failed for a long time, let me create an issue for it.

Edit: #3588

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/blocked-paths Indicates that a PR should not merge because it touches files in blocked paths. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority ok-to-test Indicates a non-member PR verified by an org member that is safe to test. sig/release Categorizes an issue or PR as relevant to SIG Release. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants