events log cleanup

pull/496/head
Frostebite 2023-02-14 12:35:50 +00:00
parent a7787b43cd
commit 95c43bfc84
1 changed files with 4 additions and 2 deletions

View File

@ -123,13 +123,12 @@ class KubernetesTaskRunner {
await waitUntil(
async () => {
const status = await kubeClient.readNamespacedPodStatus(podName, namespace);
const events = await kubeClient.listNamespacedEvent(namespace);
const phase = status?.body.status?.phase;
success = phase === 'Running';
CloudRunnerLogger.log(
`${status.body.status?.phase} ${status.body.status?.conditions?.[0].reason || ''} ${
status.body.status?.conditions?.[0].message || ''
} \n ${JSON.stringify(events, undefined, 4)}`,
}`,
);
if (success || phase !== 'Pending') return true;
@ -141,6 +140,9 @@ class KubernetesTaskRunner {
},
);
const events = await kubeClient.listNamespacedEvent(namespace);
CloudRunnerLogger.log(JSON.stringify(events, undefined, 4));
return success;
}
}