I have a daily k8s cron job, I need to have unique id for every created job, which is same on job restart in case of job failure. Example:
2021-04-10, restarts:0, id = 1234 -> failed
2021-04-10, restarts:1, id = 1234 -> failed
2021-04-10, restarts:2, id = 1234 -> failed
2021-04-11, restarts:0, id 1235 -> failed
2021-04-11, restarts:1, id 1235 -> failed
2021-04-12, restarts:0, id 1236 -> success
2021-04-13, restarts:0, id 1237 -> success
Is there a way I generate such a variable ?