@@ -97,15 +97,6 @@ func InstallCmd(ctx context.Context, name string) *cobra.Command {
97
97
cancel () // Cancel context when command completes
98
98
},
99
99
RunE : func (cmd * cobra.Command , args []string ) error {
100
- var airgapInfo * kotsv1beta1.Airgap
101
- if flags .airgapBundle != "" {
102
- var err error
103
- airgapInfo , err = airgap .AirgapInfoFromPath (flags .airgapBundle )
104
- if err != nil {
105
- return fmt .Errorf ("failed to get airgap info: %w" , err )
106
- }
107
- }
108
-
109
100
if err := verifyAndPrompt (ctx , name , flags , prompts .New ()); err != nil {
110
101
return err
111
102
}
@@ -114,7 +105,7 @@ func InstallCmd(ctx context.Context, name string) *cobra.Command {
114
105
}
115
106
116
107
if flags .enableManagerExperience {
117
- return runManagerExperienceInstall (ctx , flags , rc , airgapInfo )
108
+ return runManagerExperienceInstall (ctx , flags , rc )
118
109
}
119
110
120
111
_ = rc .SetEnv ()
@@ -131,7 +122,7 @@ func InstallCmd(ctx context.Context, name string) *cobra.Command {
131
122
installReporter .ReportSignalAborted (ctx , sig )
132
123
})
133
124
134
- if err := runInstall (cmd .Context (), flags , rc , installReporter , airgapInfo ); err != nil {
125
+ if err := runInstall (cmd .Context (), flags , rc , installReporter ); err != nil {
135
126
// Check if this is an interrupt error from the terminal
136
127
if errors .Is (err , terminal .InterruptErr ) {
137
128
installReporter .ReportSignalAborted (ctx , syscall .SIGINT )
@@ -374,7 +365,7 @@ func cidrConfigFromCmd(cmd *cobra.Command) (*newconfig.CIDRConfig, error) {
374
365
return cidrCfg , nil
375
366
}
376
367
377
- func runManagerExperienceInstall (ctx context.Context , flags InstallCmdFlags , rc runtimeconfig.RuntimeConfig , airgapInfo * kotsv1beta1. Airgap ) (finalErr error ) {
368
+ func runManagerExperienceInstall (ctx context.Context , flags InstallCmdFlags , rc runtimeconfig.RuntimeConfig ) (finalErr error ) {
378
369
// this is necessary because the api listens on all interfaces,
379
370
// and we only know the interface to use when the user selects it in the ui
380
371
ipAddresses , err := netutils .ListAllValidIPAddresses ()
@@ -443,7 +434,7 @@ func runManagerExperienceInstall(ctx context.Context, flags InstallCmdFlags, rc
443
434
ManagerPort : flags .managerPort ,
444
435
License : flags .licenseBytes ,
445
436
AirgapBundle : flags .airgapBundle ,
446
- AirgapInfo : airgapInfo ,
437
+ AirgapInfo : flags . airgapInfo ,
447
438
ConfigValues : flags .configValues ,
448
439
ReleaseData : release .GetReleaseData (),
449
440
EndUserConfig : eucfg ,
@@ -461,7 +452,7 @@ func runManagerExperienceInstall(ctx context.Context, flags InstallCmdFlags, rc
461
452
return nil
462
453
}
463
454
464
- func runInstall (ctx context.Context , flags InstallCmdFlags , rc runtimeconfig.RuntimeConfig , installReporter * InstallReporter , airgapInfo * kotsv1beta1. Airgap ) (finalErr error ) {
455
+ func runInstall (ctx context.Context , flags InstallCmdFlags , rc runtimeconfig.RuntimeConfig , installReporter * InstallReporter ) (finalErr error ) {
465
456
if flags .enableManagerExperience {
466
457
return nil
467
458
}
@@ -496,7 +487,7 @@ func runInstall(ctx context.Context, flags InstallCmdFlags, rc runtimeconfig.Run
496
487
errCh := kubeutils .WaitForKubernetes (ctx , kcli )
497
488
defer logKubernetesErrors (errCh )
498
489
499
- in , err := recordInstallation (ctx , kcli , flags , rc , flags .license , airgapInfo )
490
+ in , err := recordInstallation (ctx , kcli , flags , rc , flags .license )
500
491
if err != nil {
501
492
return fmt .Errorf ("unable to record installation: %w" , err )
502
493
}
@@ -1070,7 +1061,7 @@ func waitForNode(ctx context.Context) error {
1070
1061
}
1071
1062
1072
1063
func recordInstallation (
1073
- ctx context.Context , kcli client.Client , flags InstallCmdFlags , rc runtimeconfig.RuntimeConfig , license * kotsv1beta1.License , airgapInfo * kotsv1beta1. Airgap ,
1064
+ ctx context.Context , kcli client.Client , flags InstallCmdFlags , rc runtimeconfig.RuntimeConfig , license * kotsv1beta1.License ,
1074
1065
) (* ecv1beta1.Installation , error ) {
1075
1066
// get the embedded cluster config
1076
1067
cfg := release .GetEmbeddedClusterConfig ()
@@ -1087,8 +1078,8 @@ func recordInstallation(
1087
1078
1088
1079
// extract airgap uncompressed size if airgap info is provided
1089
1080
var airgapUncompressedSize int64
1090
- if airgapInfo != nil {
1091
- airgapUncompressedSize = airgapInfo .Spec .UncompressedSize
1081
+ if flags . airgapInfo != nil {
1082
+ airgapUncompressedSize = flags . airgapInfo .Spec .UncompressedSize
1092
1083
}
1093
1084
1094
1085
// record the installation
0 commit comments