Skip to content
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

Init Helm capabilities in upgrade service #4783

Merged
merged 2 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkg/upgradeservice/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,25 @@ import (

"github.com/pkg/errors"
"github.com/replicatedhq/kots/pkg/archives"
"github.com/replicatedhq/kots/pkg/k8sutil"
identity "github.com/replicatedhq/kots/pkg/kotsadmidentity"
"github.com/replicatedhq/kots/pkg/kotsutil"
"github.com/replicatedhq/kots/pkg/logger"
"github.com/replicatedhq/kots/pkg/pull"
registrytypes "github.com/replicatedhq/kots/pkg/registry/types"
upgradepreflight "github.com/replicatedhq/kots/pkg/upgradeservice/preflight"
"github.com/replicatedhq/kots/pkg/upgradeservice/task"
"github.com/replicatedhq/kots/pkg/upgradeservice/types"
"github.com/replicatedhq/kots/pkg/util"
)

func bootstrap(params types.UpgradeServiceParams) (finalError error) {
if err := k8sutil.InitHelmCapabilities(); err != nil {
return errors.Wrap(err, "failed to init helm capabilities")
}
if err := upgradepreflight.Init(); err != nil {
return errors.Wrap(err, "failed to init preflight")
}
if params.AppIsAirgap {
if err := pullArchiveFromAirgap(params); err != nil {
return errors.Wrap(err, "failed to pull archive from airgap")
Expand Down
4 changes: 0 additions & 4 deletions pkg/upgradeservice/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ func Serve(params types.UpgradeServiceParams) error {
return errors.Wrap(err, "failed to bootstrap")
}

if err := upgradepreflight.Init(); err != nil {
return errors.Wrap(err, "failed to init preflight")
}

r := mux.NewRouter()
r.Use(handlers.ParamsMiddleware(params))

Expand Down
Loading