Skip to content

Commit

Permalink
Merge branch 'v2-upgrades-without-manager' into laverya/fix-TestHostP…
Browse files Browse the repository at this point in the history
…reflightCustomSpec
  • Loading branch information
laverya authored Jan 31, 2025
2 parents b452e2e + 4cdd659 commit f8063d4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions operator/pkg/cli/migrate_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cli

import (
"fmt"

ecv1beta1 "github.com/replicatedhq/embedded-cluster/kinds/apis/v1beta1"
"github.com/replicatedhq/embedded-cluster/operator/pkg/cli/migratev2"
"github.com/replicatedhq/embedded-cluster/operator/pkg/k8sutil"
Expand Down
14 changes: 10 additions & 4 deletions pkg/addons2/highavailability.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,15 @@ func EnableHA(ctx context.Context, kcli client.Client, isAirgap bool, serviceCID
loading := spinner.Start()
defer loading.Close()

airgapChartsPath := ""
if isAirgap {
airgapChartsPath = runtimeconfig.EmbeddedClusterChartsSubDir()
}

hcli, err := helm.NewHelm(helm.HelmOptions{
KubeConfig: runtimeconfig.PathToKubeConfig(),
K0sVersion: versions.K0sVersion,
AirgapPath: runtimeconfig.EmbeddedClusterChartsSubDir(),
AirgapPath: airgapChartsPath,
})
if err != nil {
return errors.Wrap(err, "create helm client")
Expand Down Expand Up @@ -91,9 +96,10 @@ func EnableHA(ctx context.Context, kcli client.Client, isAirgap bool, serviceCID

// TODO (@salah): add support for end user overrides
ac := &adminconsole.AdminConsole{
IsAirgap: isAirgap,
IsHA: true,
Proxy: proxy,
IsAirgap: isAirgap,
IsHA: true,
Proxy: proxy,
ServiceCIDR: serviceCIDR,
}
if err := ac.Upgrade(ctx, kcli, hcli, addOnOverrides(ac, cfgspec, nil)); err != nil {
return errors.Wrap(err, "upgrade admin console")
Expand Down

0 comments on commit f8063d4

Please sign in to comment.