Skip to content

Commit 9f3562b

Browse files
committed
Pass airgap info to infra manager
Signed-off-by: Evans Mungai <evans@replicated.com>
1 parent 00f00dc commit 9f3562b

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

api/controllers/install/controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ func NewInstallController(opts ...InstallControllerOption) (*InstallController,
226226
infra.WithTLSConfig(controller.tlsConfig),
227227
infra.WithLicense(controller.license),
228228
infra.WithAirgapBundle(controller.airgapBundle),
229+
infra.WithAirgapInfo(controller.airgapInfo),
229230
infra.WithConfigValues(controller.configValues),
230231
infra.WithReleaseData(controller.releaseData),
231232
infra.WithEndUserConfig(controller.endUserConfig),

api/internal/managers/infra/install.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"github.com/replicatedhq/embedded-cluster/pkg/addons"
1515
"github.com/replicatedhq/embedded-cluster/pkg/addons/registry"
1616
addontypes "github.com/replicatedhq/embedded-cluster/pkg/addons/types"
17-
"github.com/replicatedhq/embedded-cluster/pkg/airgap"
1817
"github.com/replicatedhq/embedded-cluster/pkg/extensions"
1918
"github.com/replicatedhq/embedded-cluster/pkg/helm"
2019
"github.com/replicatedhq/embedded-cluster/pkg/kubeutils"
@@ -99,14 +98,6 @@ func (m *infraManager) install(ctx context.Context, rc runtimeconfig.RuntimeConf
9998
return fmt.Errorf("parse license: %w", err)
10099
}
101100

102-
if m.airgapBundle != "" {
103-
var err error
104-
m.airgapInfo, err = airgap.AirgapInfoFromPath(m.airgapBundle)
105-
if err != nil {
106-
return fmt.Errorf("failed to get airgap info: %w", err)
107-
}
108-
}
109-
110101
if err := m.initComponentsList(license, rc); err != nil {
111102
return fmt.Errorf("init components: %w", err)
112103
}

api/internal/managers/infra/manager.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ func WithAirgapBundle(airgapBundle string) InfraManagerOption {
8686
}
8787
}
8888

89+
func WithAirgapInfo(airgapInfo *kotsv1beta1.Airgap) InfraManagerOption {
90+
return func(c *infraManager) {
91+
c.airgapInfo = airgapInfo
92+
}
93+
}
94+
8995
func WithConfigValues(configValues string) InfraManagerOption {
9096
return func(c *infraManager) {
9197
c.configValues = configValues

0 commit comments

Comments
 (0)