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

docs: Clarify '--domain' parameter in server:start command #613

Merged
merged 1 commit into from
Apr 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@ OPTIONS

-b, --domain=domain
Domain of the Kubernetes cluster (e.g. example.k8s-cluster.com or <local-ip>.nip.io)
This flag makes sense only for Kubernetes family infrastructures and will be autodetected for
Minikube and MicroK8s in most cases.
However, for Kubernetes cluster it is required to specify.
Please note, that just setting this flag will not likely work out of the box.
According changes should be done in Kubernetes cluster configuration as well.
In case of Openshift, domain adjustment should be done on the cluster configuration level.

-d, --directory=directory
Directory to store logs into
Expand Down
12 changes: 11 additions & 1 deletion src/commands/server/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { CheTasks } from '../../tasks/che'
import { InstallerTasks } from '../../tasks/installers/installer'
import { ApiTasks } from '../../tasks/platforms/api'
import { PlatformTasks } from '../../tasks/platforms/platform'
import { isOpenshiftPlatformFamily } from '../../util'

export default class Start extends Command {
static description = 'start Eclipse Che server'
Expand Down Expand Up @@ -100,7 +101,12 @@ export default class Start extends Command {
}),
domain: string({
char: 'b',
description: 'Domain of the Kubernetes cluster (e.g. example.k8s-cluster.com or <local-ip>.nip.io)',
description: `Domain of the Kubernetes cluster (e.g. example.k8s-cluster.com or <local-ip>.nip.io)
This flag makes sense only for Kubernetes family infrastructures and will be autodetected for Minikube and MicroK8s in most cases.
However, for Kubernetes cluster it is required to specify.
Please note, that just setting this flag will not likely work out of the box.
According changes should be done in Kubernetes cluster configuration as well.
In case of Openshift, domain adjustment should be done on the cluster configuration level.`,
default: ''
}),
debug: boolean({
Expand Down Expand Up @@ -214,6 +220,10 @@ export default class Start extends Command {
}
}

if (flags.domain && !flags['che-operator-cr-yaml'] && isOpenshiftPlatformFamily(flags.platform)) {
this.warn('"--domain" flag is ignored for Openshift family infrastructures. It should be done on the cluster level.')
}

if (flags.installer) {
if (flags.installer === 'minishift-addon') {
if (flags.platform !== 'minishift') {
Expand Down