Skip to content

Commit

Permalink
feat: Add flag to skip health check (#685)
Browse files Browse the repository at this point in the history
* Add flag to skip health check

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
  • Loading branch information
tolusha authored May 5, 2020
1 parent 05b537b commit 9061410
Show file tree
Hide file tree
Showing 20 changed files with 81 additions and 29 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ OPTIONS
-p, --platform=minikube|minishift|k8s|openshift|microk8s|docker-desktop|crc
Type of Kubernetes platform. Valid values are "minikube", "minishift", "k8s (for kubernetes)", "openshift", "crc
(for CodeReady Containers)", "microk8s".
--skip-kubernetes-health-check
Skip Kubernetes health check
```

_See code: [src/commands/cacert/export.ts](https://github.com/che-incubator/chectl/blob/v0.0.2/src/commands/cacert/export.ts)_
Expand Down Expand Up @@ -238,6 +241,8 @@ OPTIONS
--debug-port=debug-port [default: 8000] Eclipse Che server debug port
--listr-renderer=default|silent|verbose [default: default] Listr renderer
--skip-kubernetes-health-check Skip Kubernetes health check
```

_See code: [src/commands/server/debug.ts](https://github.com/che-incubator/chectl/blob/v0.0.2/src/commands/server/debug.ts)_
Expand All @@ -259,6 +264,8 @@ OPTIONS
--listr-renderer=default|silent|verbose [default: default] Listr renderer
--skip-deletion-check Skip user confirmation on deletion check
--skip-kubernetes-health-check Skip Kubernetes health check
```

_See code: [src/commands/server/delete.ts](https://github.com/che-incubator/chectl/blob/v0.0.2/src/commands/server/delete.ts)_
Expand All @@ -281,6 +288,8 @@ OPTIONS
--deployment-name=deployment-name [default: che] Eclipse Che deployment name
--listr-renderer=default|silent|verbose [default: default] Listr renderer
--skip-kubernetes-health-check Skip Kubernetes health check
```

_See code: [src/commands/server/logs.ts](https://github.com/che-incubator/chectl/blob/v0.0.2/src/commands/server/logs.ts)_
Expand Down Expand Up @@ -415,6 +424,9 @@ OPTIONS
--skip-cluster-availability-check
Skip cluster availability check. The check is a simple request to ensure the cluster is reachable.
--skip-kubernetes-health-check
Skip Kubernetes health check
--skip-version-check
Skip minimal versions check.
Expand Down Expand Up @@ -454,6 +466,8 @@ OPTIONS
--deployment-name=deployment-name [default: che] Eclipse Che deployment name
--listr-renderer=default|silent|verbose [default: default] Listr renderer
--skip-kubernetes-health-check Skip Kubernetes health check
```

_See code: [src/commands/server/stop.ts](https://github.com/che-incubator/chectl/blob/v0.0.2/src/commands/server/stop.ts)_
Expand Down Expand Up @@ -493,6 +507,8 @@ OPTIONS
--listr-renderer=default|silent|verbose [default: default] Listr renderer
--skip-kubernetes-health-check Skip Kubernetes health check
--skip-version-check Skip user confirmation on version check
```

Expand Down Expand Up @@ -534,6 +550,8 @@ OPTIONS
--name=name Workspace name: overrides the workspace name to use instead of the one defined in the
devfile.
--skip-kubernetes-health-check Skip Kubernetes health check
```

_See code: [src/commands/workspace/create.ts](https://github.com/che-incubator/chectl/blob/v0.0.2/src/commands/workspace/create.ts)_
Expand All @@ -559,6 +577,8 @@ OPTIONS
--delete-namespace Indicates that a Kubernetes namespace where workspace was created will be deleted as
well
--skip-kubernetes-health-check Skip Kubernetes health check
```

_See code: [src/commands/workspace/delete.ts](https://github.com/che-incubator/chectl/blob/v0.0.2/src/commands/workspace/delete.ts)_
Expand Down Expand Up @@ -590,6 +610,8 @@ OPTIONS
--access-token=access-token Eclipse Che OIDC Access Token
--kube-context=kube-context Kubeconfig context to inject
--skip-kubernetes-health-check Skip Kubernetes health check
```

_See code: [src/commands/workspace/inject.ts](https://github.com/che-incubator/chectl/blob/v0.0.2/src/commands/workspace/inject.ts)_
Expand All @@ -609,6 +631,8 @@ OPTIONS
deployed
--access-token=access-token Eclipse Che OIDC Access Token
--skip-kubernetes-health-check Skip Kubernetes health check
```

_See code: [src/commands/workspace/list.ts](https://github.com/che-incubator/chectl/blob/v0.0.2/src/commands/workspace/list.ts)_
Expand All @@ -632,6 +656,8 @@ OPTIONS
field.
--listr-renderer=default|silent|verbose [default: default] Listr renderer
--skip-kubernetes-health-check Skip Kubernetes health check
```

_See code: [src/commands/workspace/logs.ts](https://github.com/che-incubator/chectl/blob/v0.0.2/src/commands/workspace/logs.ts)_
Expand All @@ -657,6 +683,8 @@ OPTIONS
deployed
--access-token=access-token Eclipse Che OIDC Access Token
--skip-kubernetes-health-check Skip Kubernetes health check
```

_See code: [src/commands/workspace/start.ts](https://github.com/che-incubator/chectl/blob/v0.0.2/src/commands/workspace/start.ts)_
Expand All @@ -679,6 +707,8 @@ OPTIONS
deployed
--access-token=access-token Eclipse Che OIDC Access Token
--skip-kubernetes-health-check Skip Kubernetes health check
```

_See code: [src/commands/workspace/stop.ts](https://github.com/che-incubator/chectl/blob/v0.0.2/src/commands/workspace/stop.ts)_
Expand Down
3 changes: 2 additions & 1 deletion src/commands/cacert/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import * as os from 'os'
import * as path from 'path'

import { CheHelper } from '../../api/che'
import { cheNamespace } from '../../common-flags'
import { cheNamespace, skipKubeHealthzCheck } from '../../common-flags'
import { DEFAULT_CA_CERT_FILE_NAME } from '../../constants'
import { CheTasks } from '../../tasks/che'
import { ApiTasks } from '../../tasks/platforms/api'
Expand All @@ -42,6 +42,7 @@ export default class Export extends Command {
env: 'CHE_CA_CERT_LOCATION',
default: ''
}),
'skip-kubernetes-health-check': skipKubeHealthzCheck
}

async run() {
Expand Down
5 changes: 3 additions & 2 deletions src/commands/server/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Command, flags } from '@oclif/command'
import { integer } from '@oclif/parser/lib/flags'
import * as Listr from 'listr'

import { cheNamespace, listrRenderer } from '../../common-flags'
import { cheNamespace, listrRenderer, skipKubeHealthzCheck } from '../../common-flags'
import { CheTasks } from '../../tasks/che'
import { ApiTasks } from '../../tasks/platforms/api'

Expand All @@ -26,7 +26,8 @@ export default class Debug extends Command {
'debug-port': integer({
description: 'Eclipse Che server debug port',
default: 8000
})
}),
'skip-kubernetes-health-check': skipKubeHealthzCheck
}

async run() {
Expand Down
3 changes: 2 additions & 1 deletion src/commands/server/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { cli } from 'cli-ux'
import * as Listrq from 'listr'

import { KubeHelper } from '../../api/kube'
import { cheNamespace, listrRenderer } from '../../common-flags'
import { cheNamespace, listrRenderer, skipKubeHealthzCheck } from '../../common-flags'
import { CheTasks } from '../../tasks/che'
import { HelmTasks } from '../../tasks/installers/helm'
import { MinishiftAddonTasks } from '../../tasks/installers/minishift-addon'
Expand All @@ -33,6 +33,7 @@ export default class Delete extends Command {
description: 'Skip user confirmation on deletion check',
default: false
}),
'skip-kubernetes-health-check': skipKubeHealthzCheck
}

async run() {
Expand Down
5 changes: 3 additions & 2 deletions src/commands/server/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import * as notifier from 'node-notifier'
import * as os from 'os'
import * as path from 'path'

import { cheDeployment, cheNamespace, listrRenderer } from '../../common-flags'
import { cheDeployment, cheNamespace, listrRenderer, skipKubeHealthzCheck } from '../../common-flags'
import { CheTasks } from '../../tasks/che'
import { ApiTasks } from '../../tasks/platforms/api'

Expand All @@ -31,7 +31,8 @@ export default class Logs extends Command {
char: 'd',
description: 'Directory to store logs into',
env: 'CHE_LOGS'
})
}),
'skip-kubernetes-health-check': skipKubeHealthzCheck
}

async run() {
Expand Down
5 changes: 3 additions & 2 deletions src/commands/server/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import * as notifier from 'node-notifier'
import * as os from 'os'
import * as path from 'path'

import { cheDeployment, cheNamespace, listrRenderer } from '../../common-flags'
import { cheDeployment, cheNamespace, listrRenderer, skipKubeHealthzCheck as skipK8sHealthCheck } from '../../common-flags'
import { DEFAULT_CHE_IMAGE, DEFAULT_CHE_OPERATOR_IMAGE, DOCS_LINK_INSTALL_TLS_WITH_SELF_SIGNED_CERT } from '../../constants'
import { CheTasks } from '../../tasks/che'
import { retrieveCheCaCertificateTask } from '../../tasks/installers/common-tasks'
Expand Down Expand Up @@ -185,7 +185,8 @@ export default class Start extends Command {
Catalog source will be applied to the namespace with Che operator.
Also you need define 'olm-channel' name and 'package-manifest-name'.
This parameter is used only when the installer is the 'olm'.`,
})
}),
'skip-kubernetes-health-check': skipK8sHealthCheck
}

async setPlaformDefaults(flags: any): Promise<void> {
Expand Down
5 changes: 3 additions & 2 deletions src/commands/server/stop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import { Command, flags } from '@oclif/command'
import { string } from '@oclif/parser/lib/flags'

import { accessToken, cheDeployment, cheNamespace, listrRenderer } from '../../common-flags'
import { accessToken, cheDeployment, cheNamespace, listrRenderer, skipKubeHealthzCheck } from '../../common-flags'
import { CheTasks } from '../../tasks/che'
import { ApiTasks } from '../../tasks/platforms/api'

Expand All @@ -28,7 +28,8 @@ export default class Stop extends Command {
env: 'CHE_SELECTOR'
}),
'access-token': accessToken,
'listr-renderer': listrRenderer
'listr-renderer': listrRenderer,
'skip-kubernetes-health-check': skipKubeHealthzCheck
}

async run() {
Expand Down
3 changes: 2 additions & 1 deletion src/commands/server/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import * as notifier from 'node-notifier'
import * as path from 'path'

import { KubeHelper } from '../../api/kube'
import { cheDeployment, cheNamespace, listrRenderer } from '../../common-flags'
import { cheDeployment, cheNamespace, listrRenderer, skipKubeHealthzCheck } from '../../common-flags'
import { CHE_CLUSTER_CR_NAME, DEFAULT_CHE_OPERATOR_IMAGE } from '../../constants'
import { CheTasks } from '../../tasks/che'
import { InstallerTasks } from '../../tasks/installers/installer'
Expand Down Expand Up @@ -57,6 +57,7 @@ export default class Update extends Command {
}),
'deployment-name': cheDeployment,
'listr-renderer': listrRenderer,
'skip-kubernetes-health-check': skipKubeHealthzCheck,
help: flags.help({ char: 'h' }),
}

Expand Down
5 changes: 3 additions & 2 deletions src/commands/workspace/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { cli } from 'cli-ux'
import * as Listr from 'listr'
import * as notifier from 'node-notifier'

import { accessToken, cheNamespace } from '../../common-flags'
import { accessToken, cheNamespace, skipKubeHealthzCheck } from '../../common-flags'
import { CheTasks } from '../../tasks/che'
import { ApiTasks } from '../../tasks/platforms/api'
import { WorkspaceTasks } from '../../tasks/workspace-tasks'
Expand Down Expand Up @@ -45,7 +45,8 @@ export default class Create extends Command {
description: 'Debug workspace start. It is useful when workspace start fails and it is needed to print more logs on startup. This flag is used in conjunction with --start flag.',
default: false
}),
'access-token': accessToken
'access-token': accessToken,
'skip-kubernetes-health-check': skipKubeHealthzCheck
}

async run() {
Expand Down
5 changes: 3 additions & 2 deletions src/commands/workspace/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import * as notifier from 'node-notifier'

import { CheHelper } from '../../api/che'
import { KubeHelper } from '../../api/kube'
import { accessToken, cheNamespace } from '../../common-flags'
import { accessToken, cheNamespace, skipKubeHealthzCheck } from '../../common-flags'
import { CheTasks } from '../../tasks/che'
import { ApiTasks } from '../../tasks/platforms/api'

Expand All @@ -29,7 +29,8 @@ export default class Delete extends Command {
description: 'Indicates that a Kubernetes namespace where workspace was created will be deleted as well',
default: false
}),
'access-token': accessToken
'access-token': accessToken,
'skip-kubernetes-health-check': skipKubeHealthzCheck
}
static args = [
{
Expand Down
5 changes: 3 additions & 2 deletions src/commands/workspace/inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as path from 'path'

import { CheHelper } from '../../api/che'
import { KubeHelper } from '../../api/kube'
import { accessToken, cheNamespace } from '../../common-flags'
import { accessToken, cheNamespace, skipKubeHealthzCheck } from '../../common-flags'
import { CheTasks } from '../../tasks/che'
import { ApiTasks } from '../../tasks/platforms/api'
import { getClusterClientCommand, OPENSHIFT_CLI } from '../../util'
Expand Down Expand Up @@ -50,7 +50,8 @@ export default class Inject extends Command {
required: false
}),
'access-token': accessToken,
chenamespace: cheNamespace
chenamespace: cheNamespace,
'skip-kubernetes-health-check': skipKubeHealthzCheck
}

// Holds cluster CLI tool name: kubectl or oc
Expand Down
5 changes: 3 additions & 2 deletions src/commands/workspace/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { cli } from 'cli-ux'
import * as Listrq from 'listr'

import { CheHelper } from '../../api/che'
import { accessToken, cheNamespace } from '../../common-flags'
import { accessToken, cheNamespace, skipKubeHealthzCheck } from '../../common-flags'
import { CheTasks } from '../../tasks/che'
import { ApiTasks } from '../../tasks/platforms/api'

Expand All @@ -23,7 +23,8 @@ export default class List extends Command {
static flags = {
help: flags.help({ char: 'h' }),
chenamespace: cheNamespace,
'access-token': accessToken
'access-token': accessToken,
'skip-kubernetes-health-check': skipKubeHealthzCheck
}

async run() {
Expand Down
5 changes: 3 additions & 2 deletions src/commands/workspace/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import * as notifier from 'node-notifier'
import * as os from 'os'
import * as path from 'path'

import { listrRenderer } from '../../common-flags'
import { listrRenderer, skipKubeHealthzCheck } from '../../common-flags'
import { CheTasks } from '../../tasks/che'
import { ApiTasks } from '../../tasks/platforms/api'

Expand All @@ -39,7 +39,8 @@ export default class Logs extends Command {
char: 'd',
description: 'Directory to store logs into',
env: 'CHE_LOGS'
})
}),
'skip-kubernetes-health-check': skipKubeHealthzCheck
}

async run() {
Expand Down
3 changes: 2 additions & 1 deletion src/commands/workspace/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { cli } from 'cli-ux'
import Listr = require('listr')
import * as notifier from 'node-notifier'

import { accessToken, cheNamespace } from '../../common-flags'
import { accessToken, cheNamespace, skipKubeHealthzCheck } from '../../common-flags'
import { CheTasks } from '../../tasks/che'
import { ApiTasks } from '../../tasks/platforms/api'
import { WorkspaceTasks } from '../../tasks/workspace-tasks'
Expand All @@ -30,6 +30,7 @@ export default class Start extends Command {
}),
'access-token': accessToken,
chenamespace: cheNamespace,
'skip-kubernetes-health-check': skipKubeHealthzCheck
}

static args = [
Expand Down
3 changes: 2 additions & 1 deletion src/commands/workspace/stop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { cli } from 'cli-ux'
import Listr = require('listr')
import * as notifier from 'node-notifier'

import { accessToken, cheNamespace } from '../../common-flags'
import { accessToken, cheNamespace, skipKubeHealthzCheck } from '../../common-flags'
import { CheTasks } from '../../tasks/che'
import { ApiTasks } from '../../tasks/platforms/api'
import { WorkspaceTasks } from '../../tasks/workspace-tasks'
Expand All @@ -25,6 +25,7 @@ export default class Stop extends Command {
help: flags.help({ char: 'h' }),
'access-token': accessToken,
chenamespace: cheNamespace,
'skip-kubernetes-health-check': skipKubeHealthzCheck
}

static args = [
Expand Down
Loading

0 comments on commit 9061410

Please sign in to comment.