Skip to content

Commit

Permalink
Skip missing blobs in import
Browse files Browse the repository at this point in the history
Signed-off-by: Jussi Nummelin <jnummelin@mirantis.com>
  • Loading branch information
jnummelin committed May 24, 2024
1 parent 87d6609 commit 29c7544
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/component/worker/ocibundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ func (a *OCIBundleReconciler) unpackBundle(ctx context.Context, client *containe
return fmt.Errorf("can't open bundle file %s: %w", bundlePath, err)
}
defer r.Close()
images, err := client.Import(ctx, r)
// WithSkipMissing allows us to skip missing blobs
// Without this the importing would fail if the bundle does not images for compatible architectures
// because the image manifest still refers to those. E.g. on arm64 containerd would stil try to unpack arm/v8&arm/v7
// images but would fail as those are not present on k0s airgap bundles.
images, err := client.Import(ctx, r, containerd.WithSkipMissing())
if err != nil {
return fmt.Errorf("can't import bundle: %w", err)
}
Expand Down

0 comments on commit 29c7544

Please sign in to comment.