Closed pablochacin closed 2 years ago
Given the example:
kubernetes.pods.create({
namespace: namespace,
name: podName,
image: image,
command: command
})
const options = {
namespace: namespace,
name: podName,
status: "Succeeded",
timeout: "10s"
}
if (kubernetes.pods.wait(options)) {
console.log(podName + " pod completed successfully")
} else {
throw podName + " is not completed"
}
I suggest adding the timeout
option to the creation command. It could be something like:
const resultExecution = kubernetes.pods.createAndWait({
namespace: namespace,
name: podName,
image: image,
command: command,
timeout: "10s"
})
or any other alternative:
kubernetes.pods.sendCommand
: and timeout is required.I suggest adding the timeout option to the creation command. It could be something like:
@ppcano this is already done. I just also made possible to wait after the pod is created. This is useful for waiting for the pod to complete.
Add option for waiting until the Pod is running to pod Create. if the pod is not running after a given timeout, an error is returned.
Closes #43