pulumi / pulumi-kubernetes-operator

A Kubernetes Operator that automates the deployment of Pulumi Stacks
Apache License 2.0
222 stars 55 forks source link

Use sequential numbering for naming the Update object #710

Closed EronWright closed 4 days ago

EronWright commented 2 weeks ago

Either use the stack history to anticipate the next update #, or simply use the current timestamp.

For example, in Go Playground:

fmt.Printf("random-yaml-%x\n", time.Now().UnixMilli())

random-yaml-124e0533580  
cleverguy25 commented 2 weeks ago

Added to epic https://github.com/pulumi/pulumi-kubernetes-operator/issues/586

EronWright commented 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