-
Notifications
You must be signed in to change notification settings - Fork 38
app-proxy-fixes #702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
app-proxy-fixes #702
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ function printInstallationOptionsSummary({ | |
noProxy, | ||
appProxy, | ||
appProxyHost, | ||
appProxyPathPrefix, | ||
dryRun, | ||
shouldUseHelm, | ||
}) { | ||
|
@@ -77,7 +78,7 @@ function printInstallationOptionsSummary({ | |
`; | ||
|
||
if (appProxy) { | ||
summary += `7. App-Proxy hostname: ${colors.cyan(appProxyHost)}\n`; | ||
summary += `7. App-Proxy address: ${colors.cyan(`https://${appProxyHost}${appProxyPathPrefix || ''}`)}\n`; | ||
} | ||
if (dryRun) { | ||
summary += '**** running in dry-run mode ****'; | ||
|
@@ -425,10 +426,11 @@ const initCmd = new Command({ | |
const answers = await inquirer.prompt(questions); | ||
kubeContextName = kubeContextName || answers.context; | ||
kubeNamespace = kubeNamespace || answers.namespace; | ||
appProxyHost = appProxyHost || answers.appProxyHost; | ||
shouldMakeDefaultRe = _.isUndefined(shouldMakeDefaultRe) ? answers.shouldMakeDefaultRe : shouldMakeDefaultRe; | ||
shouldExecutePipeline = _.isUndefined(shouldExecutePipeline) ? answers.shouldExecutePipeline : shouldExecutePipeline; | ||
// eslint-disable-next-line object-curly-newline | ||
({ httpProxy, httpsProxy, noProxy, appProxyHost } = answers); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is the bug. it would just get override if it's given by flag instead of question |
||
({ httpProxy, httpsProxy, noProxy } = answers); | ||
} | ||
|
||
printInstallationOptionsSummary({ | ||
|
@@ -441,6 +443,7 @@ const initCmd = new Command({ | |
noProxy, | ||
appProxy, | ||
appProxyHost, | ||
appProxyPathPrefix, | ||
dryRun, | ||
shouldUseHelm, | ||
}); | ||
|
@@ -736,6 +739,7 @@ const initCmd = new Command({ | |
condition: !shouldUseHelm, | ||
}); | ||
|
||
// install app-proxy | ||
installationPlan.addStep({ | ||
name: 'install app-proxy', | ||
func: async () => { | ||
|
@@ -755,8 +759,6 @@ const initCmd = new Command({ | |
appProxyIngressClass, | ||
dryRun, | ||
}); | ||
const appProxyUrl = `https://${appProxyHost}${appProxyPathPrefix || ''}`; | ||
installationPlan.addContext('appProxyIP', `${appProxyUrl}`); | ||
}, | ||
installationEvent: installationProgress.events.APP_PROXY_INSTALLED, | ||
condition: !!appProxy && !shouldUseHelm, | ||
|
@@ -771,19 +773,13 @@ const initCmd = new Command({ | |
const re = await sdk.runtimeEnvs.get({ name: reName }); | ||
const body = { | ||
appProxy: { | ||
externalIP: installationPlan.getContext('appProxyIP'), | ||
externalIP: `https://${appProxyHost}${appProxyPathPrefix || ''}`, | ||
}, | ||
}; | ||
await sdk.runtimeEnvs.update({ name: reName }, _.merge(re, body)); | ||
console.log(`Runtime environment "${colors.cyan(reName)}" has been updated with the app proxy`); | ||
}, | ||
condition: async () => { | ||
if (shouldUseHelm) { | ||
return false; | ||
} | ||
|
||
return installationPlan.getContext('appProxyIP'); | ||
}, | ||
condition: !!appProxy && !!appProxyHost, | ||
}); | ||
|
||
// update agent with new runtime | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to print the full address in the summary. It's more helpful to us for debugging because that's the value that would actually be used by the ui.