Closed EronWright closed 4 days ago
For comparison, here's the logic for naming of cronjob pods: https://github.com/kubernetes/kubernetes/blob/b7d1766c186f9bf9b104716b0f744223d9523dd8/pkg/controller/cronjob/utils.go#L276
Which resembles:
hello-28819970-mgh5n 0/1 Terminating 0 3m3s
hello-28819970-mgh5n 0/1 Terminating 0 3m3s
hello-28819974-qdccd 0/1 Pending 0 0s
hello-28819974-qdccd 0/1 Pending 0 0s
hello-28819974-qdccd 0/1 ContainerCreating 0 0s
hello-28819974-qdccd 0/1 Completed 0 1s
hello-28819974-qdccd 0/1 Completed 0 2s
hello-28819974-qdccd 0/1 Completed 0 3s
hello-28819974-qdccd 0/1 Completed 0 3s
hello-28819971-9kr4l 0/1 Terminating 0 3m3s
hello-28819971-9kr4l 0/1 Terminating 0 3m3s
hello-28819975-9plkj 0/1 Pending 0 0s
hello-28819975-9plkj 0/1 Pending 0 0s
hello-28819975-9plkj 0/1 ContainerCreating 0 0s
hello-28819975-9plkj 0/1 Completed 0 1s
hello-28819975-9plkj 0/1 Completed 0 2s
Either use the stack history to anticipate the next update #, or simply use the current timestamp.
For example, in Go Playground: