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

speed up build time using platform specific image/arguments #773

Merged
merged 1 commit into from
Jul 28, 2024

Conversation

Huang-Wei
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

Use --platform=${BUILDPLATFORM} in dockerfiles to speed-up build time.

Which issue(s) this PR fixes:

A follow-up of #772

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 28, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Huang-Wei

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 28, 2024
Copy link

netlify bot commented Jul 28, 2024

Deploy Preview for kubernetes-sigs-scheduler-plugins canceled.

Name Link
🔨 Latest commit d547ee8
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-scheduler-plugins/deploys/66a5ab6c7d7145000836bf33

@Huang-Wei Huang-Wei merged commit 5fc33cd into kubernetes-sigs:master Jul 28, 2024
9 of 10 checks passed
@Huang-Wei Huang-Wei deleted the BUILDPLATFORM branch July 28, 2024 02:45
@Huang-Wei
Copy link
Contributor Author

Nice, now 4 platforms X 2 components (controller & scheduler) only takes 9m54s to build.

image

And I can confirm the distroless image contains 4 platforms:

⇒  manifest-tool inspect gcr.io/k8s-staging-scheduler-plugins/kube-scheduler:v20240728-v0.28.8-85-g5fc33cd4
Name:   gcr.io/k8s-staging-scheduler-plugins/kube-scheduler:v20240728-v0.28.8-85-g5fc33cd4 (Type: application/vnd.docker.distribution.manifest.list.v2+json)
Digest: sha256:401442356c64b11b9bfb992fafb0f891c6ca913e4007510721a2793a5f394fab
 * Contains 4 manifest references (4 images, 0 attestation):
[1]     Type: application/vnd.docker.distribution.manifest.v2+json
[1]   Digest: sha256:fc7972253e98dc50c0a18a7fb66c4888d6eba2513175501956ff197256b1ef8e
[1]   Length: 2840
[1] Platform:
[1]    -      OS: linux
[1]    -    Arch: amd64
......
[2]     Type: application/vnd.docker.distribution.manifest.v2+json
[2]   Digest: sha256:c05bb915a2dcc9b3a3755826f5dac56bf71dca6ac2aba43c4f605267206f2d90
[2]   Length: 2840
[2] Platform:
[2]    -      OS: linux
[2]    -    Arch: arm64
......
[3]     Type: application/vnd.docker.distribution.manifest.v2+json
[3]   Digest: sha256:e3f226d5d8451d57fbc217becf630d80dd564cd81e06604eeae121e0775a3e89
[3]   Length: 2840
[3] Platform:
[3]    -      OS: linux
[3]    -    Arch: s390x
......
[4]     Type: application/vnd.docker.distribution.manifest.v2+json
[4]   Digest: sha256:7e1491fa24865c46d0d6ff1266af8b845e02814887f92f77b312d2b99c85a381
[4]   Length: 2840
[4] Platform:
[4]    -      OS: linux
[4]    -    Arch: ppc64le
......

@Huang-Wei
Copy link
Contributor Author

FYI @prb112 we're good now.

cc @ffromani @zwpaper

@prb112
Copy link
Contributor

prb112 commented Jul 28, 2024

Awesome - thank you @Huang-Wei - I really appreciate it.

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. release-note-none Denotes a PR that doesn't merit a release note. 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.

3 participants