Skip to content

Commit

Permalink
remove devfile and plugin registries defaults
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Vala <mvala@redhat.com>
  • Loading branch information
sparkoo committed Jul 19, 2019
1 parent 2942905 commit 2bdb455
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/commands/server/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,11 @@ export default class Start extends Command {
env: 'CHE_TEMPLATES_FOLDER'
}),
'devfile-registry-url': string({
description: 'The URL of the Devfile registry.',
default: 'https://che-devfile-registry.openshift.io/',
description: 'The URL of the external Devfile registry.',
env: 'CHE_WORKSPACE_DEVFILE__REGISTRY__URL'
}),
'plugin-registry-url': string({
description: 'The URL of the plugin registry.',
default: 'https://che-plugin-registry.openshift.io/v3',
description: 'The URL of the external plugin registry.',
env: 'CHE_WORKSPACE_PLUGIN__REGISTRY__URL'
}),
cheboottimeout: string({
Expand Down
14 changes: 11 additions & 3 deletions src/installers/helm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,26 @@ error: E_COMMAND_FAILED`)

let multiUserFlag = ''
let tlsFlag = ''
let setOptions = ''
let setOptions = []

if (flags.multiuser) {
multiUserFlag = `-f ${destDir}values/multi-user.yaml`
}

if (flags.tls) {
setOptions = `--set global.cheDomain=${flags.domain} --set global.tls.email='${ctx.tlsEmail}'`
setOptions.push(`--set global.cheDomain=${flags.domain} --set global.tls.email='${ctx.tlsEmail}'`)
tlsFlag = `-f ${destDir}values/tls.yaml`
}

let command = `helm upgrade --install che --force --namespace ${flags.chenamespace} --set global.ingressDomain=${flags.domain} ${setOptions} --set cheImage=${flags.cheimage} --set global.cheWorkspacesNamespace=${flags.chenamespace} --set che.workspace.devfileRegistryUrl=${flags['devfile-registry-url']} --set che.workspace.pluginRegistryUrl=${flags['plugin-registry-url']} ${multiUserFlag} ${tlsFlag} ${destDir}`
if (flags['plugin-registry-url']) {
setOptions.push(`--set che.workspace.pluginRegistryUrl=${flags['plugin-registry-url']} --set chePluginRegistry.deploy=false`)
}

if (flags['devfile-registry-url']) {
setOptions.push(`--set che.workspace.devfileRegistryUrl=${flags['devfile-registry-url']} --set cheDevfileRegistry.deploy=false`)
}

let command = `helm upgrade --install che --force --namespace ${flags.chenamespace} --set global.ingressDomain=${flags.domain} ${setOptions.join(' ')} --set cheImage=${flags.cheimage} --set global.cheWorkspacesNamespace=${flags.chenamespace} ${multiUserFlag} ${tlsFlag} ${destDir}`

let {code, stderr} = await execa.shell(command, { timeout: execTimeout, reject: false })
// if process failed, check the following
Expand Down

0 comments on commit 2bdb455

Please sign in to comment.