Skip to content

Commit

Permalink
return string from pod logs (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
yebrahim authored and k8s-ci-robot committed Dec 5, 2018
1 parent 114a847 commit 76bcd1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/server/k8s-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ export async function newTensorboardPod(logdir: string): Promise<void> {
name: 'gcp-credentials',
}],
}],
volumes:[{
volumes: [{
name: 'gcp-credentials',
secret:{
secret: {
secretName: 'user-gcp-sa',
},
}],
Expand Down Expand Up @@ -122,7 +122,7 @@ export function getPodLogs(podName: string): Promise<string> {
throw new Error('Cannot access kubernetes API');
}
return (k8sV1Client.readNamespacedPodLog(podName, namespace, 'main') as any)
.then((response: any) => response.body, (error: any) => {
.then((response: any) => response.body.toString(), (error: any) => {
throw new Error(JSON.stringify(error.body));
});
}

0 comments on commit 76bcd1a

Please sign in to comment.