Skip to content

Commit

Permalink
Collect operator logs (#520)
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
  • Loading branch information
tolusha committed Feb 25, 2020
1 parent 3776510 commit 385beb4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/tasks/che.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export class CheTasks {
pluginRegistryDeploymentName = 'plugin-registry'
pluginRegistrySelector = 'app=che,component=plugin-registry'

cheOperatorSelector = 'app=che-operator'

constructor(flags: any) {
this.kube = new KubeHelper(flags)
this.kubeTasks = new KubeTasks(flags)
Expand Down Expand Up @@ -493,6 +495,14 @@ export class CheTasks {
*/
serverLogsTasks(flags: any, follow: boolean): ReadonlyArray<Listr.ListrTask> {
return [
{
title: `${follow ? 'Start following' : 'Read'} Operator logs`,
skip: () => flags.installer && flags.installer !== 'operator',
task: async (ctx: any, task: any) => {
await this.che.readPodLog(flags.chenamespace, this.cheOperatorSelector, ctx.directory, follow)
task.title = `${task.title}...done`
}
},
{
title: `${follow ? 'Start following' : 'Read'} Eclipse Che logs`,
task: async (ctx: any, task: any) => {
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,7 @@ ecc-jsbn@~0.1.1:

"eclipse-che@git://github.com/eclipse/che#master":
version "0.0.0"
resolved "git://github.com/eclipse/che#444378684f44401898cfef95a3d37634464a891b"
resolved "git://github.com/eclipse/che#980be4ce442fad6bdf3f1203615af4147b06d066"

editorconfig@^0.15.0:
version "0.15.3"
Expand Down

0 comments on commit 385beb4

Please sign in to comment.