@@ -109,7 +109,6 @@ type (
109
109
IpsAllowList string
110
110
SkipIngress bool
111
111
BypassIngressClassCheck bool
112
- DownloadRuntimeDef * runtime.Runtime
113
112
114
113
versionStr string
115
114
kubeContext string
@@ -196,11 +195,15 @@ func NewRuntimeInstallCommand() *cobra.Command {
196
195
197
196
createAnalyticsReporter (ctx , reporter .InstallFlow , installationOpts .DisableTelemetry )
198
197
199
- if ( accessMode != "" ) {
198
+ if accessMode != "" {
200
199
installationOpts .AccessMode = platmodel .AccessMode (strings .ToUpper (accessMode ))
201
200
if ! installationOpts .AccessMode .IsValid () {
202
201
return fmt .Errorf ("invalid access-mode %s, must be one of: ingress|tunnel" , accessMode )
203
202
}
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
+ }
204
207
}
205
208
206
209
err := runtimeInstallCommandPreRunHandler (cmd , installationOpts )
@@ -394,7 +397,6 @@ func runtimeInstallCommandPreRunHandler(cmd *cobra.Command, opts *RuntimeInstall
394
397
395
398
opts .Insecure = true // installs argo-cd in insecure mode, we need this so that the eventsource can talk to the argocd-server with http
396
399
opts .CommonConfig = & runtime.CommonConfig {CodefreshBaseURL : cfConfig .GetCurrentContext ().URL }
397
- opts .DownloadRuntimeDef = rt
398
400
399
401
return nil
400
402
}
@@ -1145,7 +1147,11 @@ func preInstallationChecks(ctx context.Context, opts *RuntimeInstallOptions) (*r
1145
1147
return nil , err
1146
1148
}
1147
1149
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
+ }
1149
1155
1150
1156
handleCliStep (reporter .InstallStepRunPreCheckEnsureCliVersion , "Checking CLI version" , err , true , false )
1151
1157
if err != nil {
0 commit comments