@@ -109,7 +109,6 @@ type (
109109 IpsAllowList string
110110 SkipIngress bool
111111 BypassIngressClassCheck bool
112- DownloadRuntimeDef * runtime.Runtime
113112
114113 versionStr string
115114 kubeContext string
@@ -196,11 +195,15 @@ func NewRuntimeInstallCommand() *cobra.Command {
196195
197196 createAnalyticsReporter (ctx , reporter .InstallFlow , installationOpts .DisableTelemetry )
198197
199- if ( accessMode != "" ) {
198+ if accessMode != "" {
200199 installationOpts .AccessMode = platmodel .AccessMode (strings .ToUpper (accessMode ))
201200 if ! installationOpts .AccessMode .IsValid () {
202201 return fmt .Errorf ("invalid access-mode %s, must be one of: ingress|tunnel" , accessMode )
203202 }
203+
204+ if installationOpts .AccessMode == platmodel .AccessModeTunnel && installationOpts .IngressHost != "" {
205+ return fmt .Errorf ("ingress host can't be set when access mode is Tunnel" )
206+ }
204207 }
205208
206209 err := runtimeInstallCommandPreRunHandler (cmd , installationOpts )
@@ -394,7 +397,6 @@ func runtimeInstallCommandPreRunHandler(cmd *cobra.Command, opts *RuntimeInstall
394397
395398 opts .Insecure = true // installs argo-cd in insecure mode, we need this so that the eventsource can talk to the argocd-server with http
396399 opts .CommonConfig = & runtime.CommonConfig {CodefreshBaseURL : cfConfig .GetCurrentContext ().URL }
397- opts .DownloadRuntimeDef = rt
398400
399401 return nil
400402}
@@ -1145,7 +1147,11 @@ func preInstallationChecks(ctx context.Context, opts *RuntimeInstallOptions) (*r
11451147 return nil , err
11461148 }
11471149
1148- rt := opts .DownloadRuntimeDef
1150+ runtimeDef := getRuntimeDef (opts .runtimeDef , opts .versionStr )
1151+ rt , err := runtime .Download (runtimeDef , opts .RuntimeName , opts .featuresToInstall )
1152+ if err != nil {
1153+ return nil , fmt .Errorf ("failed to download runtime definition: %w" , err )
1154+ }
11491155
11501156 handleCliStep (reporter .InstallStepRunPreCheckEnsureCliVersion , "Checking CLI version" , err , true , false )
11511157 if err != nil {
0 commit comments