@@ -201,17 +201,6 @@ func NewRuntimeInstallCommand() *cobra.Command {
201
201
return fmt .Errorf ("invalid access-mode %s, must be one of: ingress|tunnel" , accessMode )
202
202
}
203
203
204
- if installationOpts .AccessMode == platmodel .AccessModeTunnel {
205
- installationOpts .featuresToInstall = append (installationOpts .featuresToInstall , runtime .InstallFeatureIngressless )
206
- accountId , err := cfConfig .GetCurrentContext ().GetAccountId (ctx )
207
- if err != nil {
208
- return fmt .Errorf ("failed creating ingressHost for tunnel: %w" , err )
209
- }
210
-
211
- installationOpts .TunnelSubdomain = fmt .Sprintf ("%s-%s" , accountId , installationOpts .RuntimeName )
212
- installationOpts .IngressHost = fmt .Sprintf ("https://%s.%s" , installationOpts .TunnelSubdomain , installationOpts .TunnelDomain )
213
- }
214
-
215
204
err := runtimeInstallCommandPreRunHandler (cmd , installationOpts )
216
205
handleCliStep (reporter .InstallPhasePreCheckFinish , "Finished pre installation checks" , err , true , false )
217
206
if err != nil {
@@ -222,21 +211,22 @@ func NewRuntimeInstallCommand() *cobra.Command {
222
211
return util .DecorateErrorWithDocsLink (fmt .Errorf ("pre installation error: %w" , err ), store .Get ().RequirementsLink )
223
212
}
224
213
225
- if installationOpts .runtimeDef == "" {
226
- installationOpts .runtimeDef = runtime .GetRuntimeDefURL (installationOpts .versionStr )
227
- }
228
-
229
214
finalParameters = map [string ]string {
230
215
"Codefresh context" : cfConfig .CurrentContext ,
231
216
"Kube context" : installationOpts .kubeContext ,
232
217
"Runtime name" : installationOpts .RuntimeName ,
233
218
"Repository URL" : installationOpts .InsCloneOpts .Repo ,
234
- "Ingress host" : installationOpts .IngressHost ,
235
219
"Ingress class" : installationOpts .IngressClass ,
236
- "Internal ingress host" : installationOpts .InternalIngressHost ,
237
220
"Installing demo resources" : strconv .FormatBool (installationOpts .InstallDemoResources ),
238
221
}
239
222
223
+ if installationOpts .AccessMode == platmodel .AccessModeTunnel {
224
+ finalParameters ["Tunnel URL" ] = installationOpts .IngressHost
225
+ } else {
226
+ finalParameters ["Ingress host" ] = installationOpts .IngressHost
227
+ finalParameters ["Internal ingress host" ] = installationOpts .InternalIngressHost
228
+ }
229
+
240
230
if err := getApprovalFromUser (ctx , finalParameters , "runtime install" ); err != nil {
241
231
return err
242
232
}
@@ -339,6 +329,14 @@ func runtimeInstallCommandPreRunHandler(cmd *cobra.Command, opts *RuntimeInstall
339
329
if opts .AccessMode == platmodel .AccessModeTunnel {
340
330
handleCliStep (reporter .InstallStepPreCheckEnsureIngressClass , "-skipped (ingressless)-" , err , true , false )
341
331
handleCliStep (reporter .InstallStepPreCheckEnsureIngressHost , "-skipped (ingressless)-" , err , true , false )
332
+ opts .featuresToInstall = append (opts .featuresToInstall , runtime .InstallFeatureIngressless )
333
+ accountId , err := cfConfig .GetCurrentContext ().GetAccountId (ctx )
334
+ if err != nil {
335
+ return fmt .Errorf ("failed creating ingressHost for tunnel: %w" , err )
336
+ }
337
+
338
+ opts .TunnelSubdomain = fmt .Sprintf ("%s-%s" , accountId , opts .RuntimeName )
339
+ opts .IngressHost = fmt .Sprintf ("https://%s.%s" , opts .TunnelSubdomain , opts .TunnelDomain )
342
340
} else {
343
341
err = ensureRoutingControllerSupported (ctx , opts )
344
342
handleCliStep (reporter .InstallStepPreCheckEnsureIngressClass , "Getting ingress class" , err , true , false )
@@ -387,6 +385,10 @@ func runtimeInstallCommandPreRunHandler(cmd *cobra.Command, opts *RuntimeInstall
387
385
log .G (ctx ).Infof ("using repo '%s' as shared config repo for this account" , sharedConfigRepo )
388
386
}
389
387
388
+ if opts .runtimeDef == "" {
389
+ opts .runtimeDef = runtime .GetRuntimeDefURL (opts .versionStr )
390
+ }
391
+
390
392
opts .Insecure = true // installs argo-cd in insecure mode, we need this so that the eventsource can talk to the argocd-server with http
391
393
opts .CommonConfig = & runtime.CommonConfig {CodefreshBaseURL : cfConfig .GetCurrentContext ().URL }
392
394
0 commit comments