Skip to content
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

remove devfile and plugin registries defaults #228

Merged
merged 3 commits into from
Jul 23, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
18 changes: 15 additions & 3 deletions src/installers/helm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,30 @@ 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']) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is happening if you use server:start without --plugin-registry-url ? it is failing no ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't set helm parameter so value from helm chart is used. By default registries will be deployed in your minikube and URLs will be set to those eclipse-che/che#13890

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok it was not clear enough for me that this PR can only be merged after eclipse-che/che#13890

Copy link
Member Author

@sparkoo sparkoo Jul 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, I don't think that this must be merged after. Helm charts currently does not set the registry urls, but then che.properties values are used, which are again set to openshift.io ones https://github.com/eclipse/che/blob/master/assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/classes/che/che.properties#L580
So basically nothing happens when we merge this one. The chectl registries url params were added just 2 days ago #189

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`)
}

setOptions.push(`--set global.ingressDomain=${flags.domain}`)
setOptions.push(`--set cheImage=${flags.cheimage}`)
setOptions.push(`--set global.cheWorkspacesNamespace=${flags.chenamespace}`)

let command = `helm upgrade --install che --force --namespace ${flags.chenamespace} ${setOptions.join(' ')} ${multiUserFlag} ${tlsFlag} ${destDir}`

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