我有一些kubernetes jobs
,需要不同的时间来完成。在4到8分钟之间。有什么方法可以让我知道一个job何时完成,我有一个测试案例,任务如下:
1) 提交kubernetes job。
2) 等待其完成。
3) 检查该jobs是否产生了预期的影响。
问题是,在我的java测试中,在kubernetes中提交部署job时,即使job完成的时间少于8分钟,我也要等待8分钟,因为我没有办法从java测试中监控job的状态。
I have kubernetes jobs that takes variable amount of time to complete. Between 4 to 8 minutes. Is there any way i can know when a job have completed, rather than waiting for 8 minutes assuming worst case. I have a test case that does the following:
1) Submits the kubernetes job.
2) Waits for its completion.
3) Checks whether the job has had the expected affect.
Problem is that in my java test that submits the deployment job in the kubernetes, I am waiting for 8 minutes even if the job has taken less than that to complete, as i dont have a way to monitor the status of the job from the java test.
I have kubernetes jobs that takes variable amount of time to complete. Between 4 to 8 minutes. Is there any way i can know when a job have completed, rather than waiting for 8 minutes assuming worst case. I have a test case that does the following:
1) Submits the kubernetes job.
2) Waits for its completion.
3) Checks whether the job has had the expected affect.
Problem is that in my java test that submits the deployment job in the kubernetes, I am waiting for 8 minutes even if the job has taken less than that to complete, as i dont have a way to monitor the status of the job from the java test.