ensure k3s collection contents have default repo specified (#109)

ensure k3s collection contents have default repo specified
This commit is contained in:
Josh Wolf
2022-01-24 17:03:07 -07:00
committed by GitHub
parent 50b5f87c86
commit dff591d08b

View File

@@ -16,6 +16,8 @@ import (
"github.com/rancherfederal/ocil/pkg/artifacts/file"
"github.com/rancherfederal/ocil/pkg/artifacts/file/getter"
"github.com/rancherfederal/hauler/pkg/reference"
)
var _ artifacts.OCICollection = (*k3s)(nil)
@@ -98,7 +100,7 @@ func (k *k3s) executable() error {
f := file.NewFile(fref)
ref := fmt.Sprintf("k3s:%s", k.dnsCompliantVersion())
ref := fmt.Sprintf("%s/k3s:%s", reference.DefaultNamespace, k.dnsCompliantVersion())
k.contents[ref] = f
return nil
}
@@ -106,7 +108,9 @@ func (k *k3s) executable() error {
func (k *k3s) bootstrap() error {
namedBootstrapUrl := fmt.Sprintf("%s?filename=%s", bootstrapUrl, "k3s-init.sh")
f := file.NewFile(namedBootstrapUrl)
k.contents["k3s-init.sh"] = f
ref := fmt.Sprintf("%s/k3s-init.sh:%s", reference.DefaultNamespace, reference.DefaultTag)
k.contents[ref] = f
return nil
}