@@ -63,6 +63,7 @@ function printInstallationOptionsSummary({
6363 noProxy,
6464 appProxy,
6565 appProxyHost,
66+ appProxyPathPrefix,
6667 dryRun,
6768 shouldUseHelm,
6869} ) {
@@ -77,7 +78,7 @@ function printInstallationOptionsSummary({
7778 ` ;
7879
7980 if ( appProxy ) {
80- summary += `7. App-Proxy hostname : ${ colors . cyan ( appProxyHost ) } \n` ;
81+ summary += `7. App-Proxy address : ${ colors . cyan ( `https:// ${ appProxyHost } ${ appProxyPathPrefix || '' } ` ) } \n` ;
8182 }
8283 if ( dryRun ) {
8384 summary += '**** running in dry-run mode ****' ;
@@ -425,10 +426,11 @@ const initCmd = new Command({
425426 const answers = await inquirer . prompt ( questions ) ;
426427 kubeContextName = kubeContextName || answers . context ;
427428 kubeNamespace = kubeNamespace || answers . namespace ;
429+ appProxyHost = appProxyHost || answers . appProxyHost ;
428430 shouldMakeDefaultRe = _ . isUndefined ( shouldMakeDefaultRe ) ? answers . shouldMakeDefaultRe : shouldMakeDefaultRe ;
429431 shouldExecutePipeline = _ . isUndefined ( shouldExecutePipeline ) ? answers . shouldExecutePipeline : shouldExecutePipeline ;
430432 // eslint-disable-next-line object-curly-newline
431- ( { httpProxy, httpsProxy, noProxy, appProxyHost } = answers ) ;
433+ ( { httpProxy, httpsProxy, noProxy } = answers ) ;
432434 }
433435
434436 printInstallationOptionsSummary ( {
@@ -441,6 +443,7 @@ const initCmd = new Command({
441443 noProxy,
442444 appProxy,
443445 appProxyHost,
446+ appProxyPathPrefix,
444447 dryRun,
445448 shouldUseHelm,
446449 } ) ;
@@ -736,6 +739,7 @@ const initCmd = new Command({
736739 condition : ! shouldUseHelm ,
737740 } ) ;
738741
742+ // install app-proxy
739743 installationPlan . addStep ( {
740744 name : 'install app-proxy' ,
741745 func : async ( ) => {
@@ -755,8 +759,6 @@ const initCmd = new Command({
755759 appProxyIngressClass,
756760 dryRun,
757761 } ) ;
758- const appProxyUrl = `https://${ appProxyHost } ${ appProxyPathPrefix || '' } ` ;
759- installationPlan . addContext ( 'appProxyIP' , `${ appProxyUrl } ` ) ;
760762 } ,
761763 installationEvent : installationProgress . events . APP_PROXY_INSTALLED ,
762764 condition : ! ! appProxy && ! shouldUseHelm ,
@@ -771,19 +773,13 @@ const initCmd = new Command({
771773 const re = await sdk . runtimeEnvs . get ( { name : reName } ) ;
772774 const body = {
773775 appProxy : {
774- externalIP : installationPlan . getContext ( 'appProxyIP' ) ,
776+ externalIP : `https:// ${ appProxyHost } ${ appProxyPathPrefix || '' } ` ,
775777 } ,
776778 } ;
777779 await sdk . runtimeEnvs . update ( { name : reName } , _ . merge ( re , body ) ) ;
778780 console . log ( `Runtime environment "${ colors . cyan ( reName ) } " has been updated with the app proxy` ) ;
779781 } ,
780- condition : async ( ) => {
781- if ( shouldUseHelm ) {
782- return false ;
783- }
784-
785- return installationPlan . getContext ( 'appProxyIP' ) ;
786- } ,
782+ condition : ! ! appProxy && ! ! appProxyHost ,
787783 } ) ;
788784
789785 // update agent with new runtime
0 commit comments