Skip to content

Commit 3e5b5e5

Browse files
authored
Init Helm capabilities in upgrade service (#4783)
* Init Helm capabilities in upgrade service * init in bootstrap
1 parent 3829fb0 commit 3e5b5e5

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

pkg/upgradeservice/bootstrap.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,25 @@ import (
99

1010
"github.com/pkg/errors"
1111
"github.com/replicatedhq/kots/pkg/archives"
12+
"github.com/replicatedhq/kots/pkg/k8sutil"
1213
identity "github.com/replicatedhq/kots/pkg/kotsadmidentity"
1314
"github.com/replicatedhq/kots/pkg/kotsutil"
1415
"github.com/replicatedhq/kots/pkg/logger"
1516
"github.com/replicatedhq/kots/pkg/pull"
1617
registrytypes "github.com/replicatedhq/kots/pkg/registry/types"
18+
upgradepreflight "github.com/replicatedhq/kots/pkg/upgradeservice/preflight"
1719
"github.com/replicatedhq/kots/pkg/upgradeservice/task"
1820
"github.com/replicatedhq/kots/pkg/upgradeservice/types"
1921
"github.com/replicatedhq/kots/pkg/util"
2022
)
2123

2224
func bootstrap(params types.UpgradeServiceParams) (finalError error) {
25+
if err := k8sutil.InitHelmCapabilities(); err != nil {
26+
return errors.Wrap(err, "failed to init helm capabilities")
27+
}
28+
if err := upgradepreflight.Init(); err != nil {
29+
return errors.Wrap(err, "failed to init preflight")
30+
}
2331
if params.AppIsAirgap {
2432
if err := pullArchiveFromAirgap(params); err != nil {
2533
return errors.Wrap(err, "failed to pull archive from airgap")

pkg/upgradeservice/server.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ func Serve(params types.UpgradeServiceParams) error {
3030
return errors.Wrap(err, "failed to bootstrap")
3131
}
3232

33-
if err := upgradepreflight.Init(); err != nil {
34-
return errors.Wrap(err, "failed to init preflight")
35-
}
36-
3733
r := mux.NewRouter()
3834
r.Use(handlers.ParamsMiddleware(params))
3935

0 commit comments

Comments
 (0)