pipecd icon indicating copy to clipboard operation
pipecd copied to clipboard

Support CronJob as PipeCD managed workload

Open Warashi opened this issue 8 months ago • 2 comments

What would you like to be added:

Support StatefulSet, CronJob, ...etc, as a workload in Kubernetes PipelineSync.

A document states that PipeCD supports Deployment as the only supported workload in the Kubernetes platform. https://pipecd.dev/docs-v0.47.x/user-guide/configuration-reference/#kubernetesworkload

I tried to specify StatefulSet as a workload, and its deployment was planned as PipelineSync. So, StatefulSet seems supported. So, the document seems wrong, or I missed some unsupported features.

Conversely, when I tried to specify CronJob as a workload, its deployment was planned as QuickSync. So, CronJob seems not supported.

This comes from the line below. CronJob's container spec is spec.jobTemplate.spec.template, not spec.template. https://github.com/pipe-cd/pipecd/blob/b20163b70902d4f0f6698ff85f8ac427d61359f8/pkg/app/piped/planner/kubernetes/kubernetes.go#L260

Why is this needed:

We want to use WAIT_APPROVAL stage with these workloads.

Warashi avatar Jun 06 '24 09:06 Warashi