mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-12 12:36:56 +00:00
Drop luet, image extractor, drop build code and multiarch images (#20)
Co-authored-by: Mauro Morales <mauro.morales@spectrocloud.com>
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/Masterminds/semver/v3"
|
||||
"github.com/docker/docker/api/types"
|
||||
events "github.com/kairos-io/kairos-sdk/bus"
|
||||
"github.com/kairos-io/kairos-sdk/utils"
|
||||
"github.com/kairos-io/kairos/v2/internal/bus"
|
||||
@@ -14,9 +13,7 @@ import (
|
||||
"github.com/kairos-io/kairos/v2/pkg/config/collector"
|
||||
"github.com/kairos-io/kairos/v2/pkg/elementalConfig"
|
||||
"github.com/kairos-io/kairos/v2/pkg/github"
|
||||
"github.com/kairos-io/kairos/v2/pkg/luet"
|
||||
v1 "github.com/kairos-io/kairos/v2/pkg/types/v1"
|
||||
elementalUtils "github.com/kairos-io/kairos/v2/pkg/utils"
|
||||
"github.com/mudler/go-pluggable"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
@@ -50,8 +47,7 @@ func ListReleases(includePrereleases bool) semver.Collection {
|
||||
}
|
||||
|
||||
func Upgrade(
|
||||
version, image string, force, debug, strictValidations bool, dirs []string, authUser string,
|
||||
authPass string, authServer string, authType string, registryToken string, identityToken string, preReleases bool,
|
||||
version, image string, force, debug, strictValidations bool, dirs []string, preReleases bool,
|
||||
) error {
|
||||
bus.Manager.Initialize()
|
||||
|
||||
@@ -129,22 +125,6 @@ func Upgrade(
|
||||
upgradeConfig.Logger.SetLevel(log.DebugLevel)
|
||||
}
|
||||
|
||||
// Generate an auth object
|
||||
auth := &types.AuthConfig{
|
||||
Username: authUser,
|
||||
Password: authPass,
|
||||
ServerAddress: authServer,
|
||||
Auth: authType,
|
||||
IdentityToken: identityToken,
|
||||
RegistryToken: registryToken,
|
||||
}
|
||||
|
||||
// Override the default luet to pass the auth
|
||||
// Remember to create the temp dir when creating a new luet object. Otherwise, things break with no temp dir.
|
||||
tmpDir := elementalUtils.GetTempDir(&upgradeConfig.Config, "")
|
||||
l := luet.NewLuet(luet.WithLogger(upgradeConfig.Logger), luet.WithAuth(auth), luet.WithLuetTempDir(tmpDir))
|
||||
upgradeConfig.Luet = l
|
||||
|
||||
// Generate the upgrade spec
|
||||
upgradeSpec, err := elementalConfig.NewUpgradeSpec(upgradeConfig.Config)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user