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

Optimize image layers #2782

Merged
merged 1 commit into from
Mar 27, 2025
Merged

Conversation

marcofranssen
Copy link
Contributor

@marcofranssen marcofranssen commented Sep 2, 2024

By moving the parts least likely to change first there will be less
layers that have to be rebuild/pushed/pulled.

@marcofranssen marcofranssen requested review from a team as code owners September 2, 2024 08:36
@maintainer-s-little-helper
Copy link

Commits 42d8aa8, ed8ea68 do not match "Signed-off-by".

Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin

Copy link
Member

@aanm aanm left a comment

Choose a reason for hiding this comment

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

@michi-covalent @tklauser with the merge of cilium-cli into cilium/cilium it's becoming confusing to where contributors can submit their changes for cilium-cli.

@marcofranssen
Copy link
Contributor Author

@michi-covalent @tklauser with the merge of cilium-cli into cilium/cilium it's becoming confusing to where contributors can submit their changes for cilium-cli.

Yes, now I'm confused 😕

Should I create such PR on the cilium repo?

Maybe this repo has to be archived?

Let me know how to proceed.

@michi-covalent
Copy link
Contributor

with the merge of cilium-cli into cilium/cilium it's becoming confusing to where contributors can submit their changes for cilium-cli.

sorry for the delay, we build release artifacts from this repo. assuming we want to build this docker image for each release tag, this is the right repo for this pull request.

@marcofranssen let's limit this pull request to Dockerfile changes only. once it gets approved & merged, i'll make necessary changes to github workflows.

@tklauser tklauser removed their request for review September 11, 2024 09:02
@christarazi christarazi marked this pull request as draft September 30, 2024 17:35
aanm
aanm previously requested changes Dec 9, 2024
Copy link
Member

@aanm aanm left a comment

Choose a reason for hiding this comment

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

Also, can't we replace cilium/cilium-cli Dockerfile with the on we have in cilium/cilium? It seems this remains unanswered.

@marcofranssen
Copy link
Contributor Author

What should I do to get this merged? I adjusted the workflow to use a separate GH environment for the release image? Went trough the open conversations but not sure how to progress now.

I feel all required changes are in.

@tklauser
Copy link
Member

What should I do to get this merged? I adjusted the workflow to use a separate GH environment for the release image? Went trough the open conversations but not sure how to progress now.

There are still two open questions from @aanm which AFAICT haven't been addressed or answered:
#2782 (review) and #2782 (comment)

@marcofranssen
Copy link
Contributor Author

Also, can't we replace cilium/cilium-cli Dockerfile with the on we have in cilium/cilium? It seems this remains unanswered.

In a previous PR I contributed this was also already the question. It seems that is something to be figured out within the cilium repo owners.

In my previous PR it was decided to continue using this repo until a decision is made. Would be great if we can unblock this PR and move forward and figure out the other part in a follow-up.

@marcofranssen
Copy link
Contributor Author

What should I do to get this merged? I adjusted the workflow to use a separate GH environment for the release image? Went trough the open conversations but not sure how to progress now.

There are still two open questions from @aanm which AFAICT haven't been addressed or answered: #2782 (review) and #2782 (comment)

I feel one was already answered, but gave it another shot with different wording.

The other one seems to be unrelated to this PR. It was already a discussion on a previous PR and there it was decided to not hold back community contribution while the cilium team figures it out internally on how and when to make that change.

@tklauser tklauser requested a review from aanm January 9, 2025 10:16
Copy link

github-actions bot commented Feb 9, 2025

This pull request has been automatically marked as stale because it
has not had recent activity. It will be closed if no further activity
occurs. Thank you for your contributions.

@marcofranssen
Copy link
Contributor Author

Rebased once again to resolve conflicts. I feel all questions have been answered. What else is required?

@github-actions github-actions bot removed the stale label Feb 11, 2025
Copy link

This pull request has been automatically marked as stale because it
has not had recent activity. It will be closed if no further activity
occurs. Thank you for your contributions.

@marcofranssen
Copy link
Contributor Author

marcofranssen commented Mar 13, 2025

@tklauser @aanm Rebased it again… What is required to get this merged?

@github-actions github-actions bot removed the stale label Mar 14, 2025
@michi-covalent
Copy link
Contributor

sorry this hasn't been progressing, let's take a step back. recently there was this pull request cilium/cilium#37970 that got rid of all the cloud provider binaries. i'll open a pull request some time this week to make a similar change in cilium-cli repo so that we can use the same Dockerfile for CI and release.

@marcofranssen
Copy link
Contributor Author

OK, please ping me here once that is in, then I will rebase the PR and update it.

@michi-covalent
Copy link
Contributor

ok i merged #2980. i also updated https://github.com/cilium/cilium-cli/blob/main/.github/workflows/images.yaml to handle the release environment so it should push a docker image to quay.io/cilium/cilium-cli when the next release gets tagged.

By moving the parts least likely to change first there will be less
layers that have to be rebuild/pushed/pulled

Signed-off-by: Marco Franssen <[email protected]>
@marcofranssen marcofranssen changed the title Enable multi-arch build for cilium-cli image Optimize image layers Mar 27, 2025
@marcofranssen
Copy link
Contributor Author

Ok, majority of my changes I discarded, renamed the PR and keep it just to optimizing couple image layers.

@michi-covalent michi-covalent dismissed aanm’s stale review March 27, 2025 14:47

now this PR is only re-ordering Dockerfile commands for better layer caching.

@michi-covalent michi-covalent merged commit 808f018 into cilium:main Mar 27, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants