-
Notifications
You must be signed in to change notification settings - Fork 372
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
Introduce k0s airgap bundle-artifacts #5360
base: main
Are you sure you want to change the base?
Conversation
This pull request has merge conflicts that need to be resolved. |
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]>
0ee98cf
to
eb54146
Compare
return refs, nil | ||
} | ||
|
||
func parseArtifactRefsFromSeq(refs iter.Seq[string]) (collected []reference.Named, _ error) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
|
||
buffered := bufio.NewWriter(out) | ||
if err := bundler.Run(ctx, refs, out); err != nil { | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error not wrapped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could change this to return fmt.Errorf("failed to bundle artifacts: %w", err)
, but I'm not sure if that adds any additional insights 🤔
@@ -25,12 +25,12 @@ import ( | |||
"github.com/spf13/cobra" | |||
) | |||
|
|||
func NewAirgapListImagesCmd() *cobra.Command { | |||
func newAirgapListImagesCmd() *cobra.Command { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other commands are exposed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, they are. But why?
This pull request has merge conflicts that need to be resolved. |
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
How Has This Been Tested?
Checklist: