events log cleanup
parent
a7787b43cd
commit
95c43bfc84
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue