Skip to content

Introduce k0s airgap bundle-artifacts #5360

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

Merged
merged 2 commits into from
May 5, 2025

Conversation

twz123
Copy link
Member

@twz123 twz123 commented Dec 13, 2024

Description

This sub-command introduces a "k0s native" way to create airgap artifact bundles. The current way to do this requires either a Docker or containerd daemon. Even then, there are certain scenarios where the created bundles don't contain all the necessary tags, i.e. when images are referenced by both their tag and their digest.

Replace image-bundler with k0s airgap bundle-artifacts. Dog-food the new sub-command in the k0s build itself.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • Manual test
  • Auto test added

Checklist:

  • My code follows the style guidelines of this project
  • My commit messages are signed-off
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@twz123 twz123 added enhancement New feature or request area/cli labels Dec 13, 2024
@twz123 twz123 marked this pull request as ready for review December 13, 2024 20:52
@twz123 twz123 requested review from a team as code owners December 13, 2024 20:52
Copy link
Contributor

This pull request has merge conflicts that need to be resolved.

return refs, nil
}

func parseArtifactRefsFromSeq(refs iter.Seq[string]) (collected []reference.Named, _ error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The _ error kind of looks like the return value can be ignored.

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'm not sure if I can follow. What would you suggest?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not using named returns, I suppose, they are terrible :)

Copy link
Member Author

@twz123 twz123 Jan 23, 2025

Choose a reason for hiding this comment

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

IMO named returns kinda come in handy on occasions like this. I removed them, but that meant I had to duplicate the var declaration ¯\_(ツ)_/¯

Copy link
Contributor

This pull request has merge conflicts that need to be resolved.

Copy link
Contributor

github-actions bot commented Jan 9, 2025

This pull request has merge conflicts that need to be resolved.

Copy link
Contributor

github-actions bot commented Jan 9, 2025

This pull request has merge conflicts that need to be resolved.

Copy link
Contributor

This pull request has merge conflicts that need to be resolved.

Copy link
Contributor

github-actions bot commented Feb 6, 2025

This pull request has merge conflicts that need to be resolved.

Copy link
Contributor

This pull request has merge conflicts that need to be resolved.

@twz123 twz123 force-pushed the bundle-artifacts-cmd branch from 17b4e4f to 2966858 Compare March 20, 2025 12:10
@twz123 twz123 force-pushed the bundle-artifacts-cmd branch from 2966858 to 1bba8f0 Compare April 8, 2025 08:34
@twz123 twz123 added this to the 1.33 milestone Apr 10, 2025
Copy link
Contributor

This pull request has merge conflicts that need to be resolved.

@twz123 twz123 force-pushed the bundle-artifacts-cmd branch from 1bba8f0 to 351e075 Compare April 30, 2025 08:53
@twz123 twz123 force-pushed the bundle-artifacts-cmd branch 2 times, most recently from 70965bd to d374052 Compare April 30, 2025 14:10
Copy link
Contributor

github-actions bot commented May 1, 2025

This pull request has merge conflicts that need to be resolved.

@twz123 twz123 force-pushed the bundle-artifacts-cmd branch from d374052 to 47877c4 Compare May 2, 2025 10:41
twz123 added 2 commits May 2, 2025 13:41
This sub-command introduces a "k0s native" way to create airgap
artifact bundles. The current way to do this requires either a Docker
or containerd daemon. Even then, there are certain scenarios where the
created bundles don't contain all the necessary tags, i.e. when images
are referenced by both their tag and their digest.

Signed-off-by: Tom Wieczorek <[email protected]>
Dog-food the new sub-command in the k0s build itself.

Signed-off-by: Tom Wieczorek <[email protected]>
@twz123 twz123 force-pushed the bundle-artifacts-cmd branch from 47877c4 to 1e6f791 Compare May 2, 2025 11:41
@twz123 twz123 merged commit 9bfcbd0 into k0sproject:main May 5, 2025
95 checks passed
@twz123 twz123 deleted the bundle-artifacts-cmd branch May 5, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants