diff --git a/pkg/kubepkg/packer.go b/pkg/kubepkg/packer.go index 4a58d38..810b020 100644 --- a/pkg/kubepkg/packer.go +++ b/pkg/kubepkg/packer.go @@ -118,14 +118,6 @@ func (p *Packer) PackAsIndex(ctx context.Context, kpkg *kubepkgv1alpha1.KubePkg) return nil, err } - finalIndex, err = p.appendManifests(finalIndex, kubePkgImage, nil, &kubepkgv1alpha1.Image{ - Name: p.ImageName(r), - Tag: kpkg.Spec.Version, - }) - if err != nil { - return nil, err - } - layers, err := kubePkgImage.Layers() if err != nil { return nil, err @@ -195,6 +187,14 @@ func (p *Packer) PackAsIndex(ctx context.Context, kpkg *kubepkgv1alpha1.KubePkg) } } + finalIndex, err = p.appendManifests(finalIndex, kubePkgImage, nil, &kubepkgv1alpha1.Image{ + Name: p.ImageName(r), + Tag: kpkg.Spec.Version, + }) + if err != nil { + return nil, err + } + return finalIndex, nil }