@@ -63,6 +63,7 @@ function printInstallationOptionsSummary({
63
63
noProxy,
64
64
appProxy,
65
65
appProxyHost,
66
+ appProxyPathPrefix,
66
67
dryRun,
67
68
shouldUseHelm,
68
69
} ) {
@@ -77,7 +78,7 @@ function printInstallationOptionsSummary({
77
78
` ;
78
79
79
80
if ( appProxy ) {
80
- summary += `7. App-Proxy hostname : ${ colors . cyan ( appProxyHost ) } \n` ;
81
+ summary += `7. App-Proxy address : ${ colors . cyan ( `https:// ${ appProxyHost } ${ appProxyPathPrefix || '' } ` ) } \n` ;
81
82
}
82
83
if ( dryRun ) {
83
84
summary += '**** running in dry-run mode ****' ;
@@ -425,10 +426,11 @@ const initCmd = new Command({
425
426
const answers = await inquirer . prompt ( questions ) ;
426
427
kubeContextName = kubeContextName || answers . context ;
427
428
kubeNamespace = kubeNamespace || answers . namespace ;
429
+ appProxyHost = appProxyHost || answers . appProxyHost ;
428
430
shouldMakeDefaultRe = _ . isUndefined ( shouldMakeDefaultRe ) ? answers . shouldMakeDefaultRe : shouldMakeDefaultRe ;
429
431
shouldExecutePipeline = _ . isUndefined ( shouldExecutePipeline ) ? answers . shouldExecutePipeline : shouldExecutePipeline ;
430
432
// eslint-disable-next-line object-curly-newline
431
- ( { httpProxy, httpsProxy, noProxy, appProxyHost } = answers ) ;
433
+ ( { httpProxy, httpsProxy, noProxy } = answers ) ;
432
434
}
433
435
434
436
printInstallationOptionsSummary ( {
@@ -441,6 +443,7 @@ const initCmd = new Command({
441
443
noProxy,
442
444
appProxy,
443
445
appProxyHost,
446
+ appProxyPathPrefix,
444
447
dryRun,
445
448
shouldUseHelm,
446
449
} ) ;
@@ -736,6 +739,7 @@ const initCmd = new Command({
736
739
condition : ! shouldUseHelm ,
737
740
} ) ;
738
741
742
+ // install app-proxy
739
743
installationPlan . addStep ( {
740
744
name : 'install app-proxy' ,
741
745
func : async ( ) => {
@@ -755,8 +759,6 @@ const initCmd = new Command({
755
759
appProxyIngressClass,
756
760
dryRun,
757
761
} ) ;
758
- const appProxyUrl = `https://${ appProxyHost } ${ appProxyPathPrefix || '' } ` ;
759
- installationPlan . addContext ( 'appProxyIP' , `${ appProxyUrl } ` ) ;
760
762
} ,
761
763
installationEvent : installationProgress . events . APP_PROXY_INSTALLED ,
762
764
condition : ! ! appProxy && ! shouldUseHelm ,
@@ -771,19 +773,13 @@ const initCmd = new Command({
771
773
const re = await sdk . runtimeEnvs . get ( { name : reName } ) ;
772
774
const body = {
773
775
appProxy : {
774
- externalIP : installationPlan . getContext ( 'appProxyIP' ) ,
776
+ externalIP : `https:// ${ appProxyHost } ${ appProxyPathPrefix || '' } ` ,
775
777
} ,
776
778
} ;
777
779
await sdk . runtimeEnvs . update ( { name : reName } , _ . merge ( re , body ) ) ;
778
780
console . log ( `Runtime environment "${ colors . cyan ( reName ) } " has been updated with the app proxy` ) ;
779
781
} ,
780
- condition : async ( ) => {
781
- if ( shouldUseHelm ) {
782
- return false ;
783
- }
784
-
785
- return installationPlan . getContext ( 'appProxyIP' ) ;
786
- } ,
782
+ condition : ! ! appProxy && ! ! appProxyHost ,
787
783
} ) ;
788
784
789
785
// update agent with new runtime
0 commit comments