Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CronJob as PipeCD managed workload #4956

Open
Warashi opened this issue Jun 6, 2024 · 2 comments
Open

Support CronJob as PipeCD managed workload #4956

Warashi opened this issue Jun 6, 2024 · 2 comments
Labels
kind/enhancement New feature or request

Comments

@Warashi
Copy link
Contributor

Warashi commented Jun 6, 2024

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.

templateDiffs := diffNodes.FindByPrefix("spec.template")

Why is this needed:

We want to use WAIT_APPROVAL stage with these workloads.

@Warashi Warashi added the kind/enhancement New feature or request label Jun 6, 2024
@khanhtc1202
Copy link
Member

Thanks @Warashi ! As mentioned in the docs, we want to support ReplicationController, DaemonSet, and StatefulSet in our plan. There is currently no CronJob on the list. Could you confirm the behavior of the current piped with the above planned Kind? If it all worked, then we can rename this issue as support CronJob as PipeCD managed workload
ref: https://pipecd.dev/docs-v0.47.x/user-guide/configuration-reference/#kubernetesworkload

@Warashi
Copy link
Contributor Author

Warashi commented Jun 7, 2024

I checked the behavior of ReplicationController, DaemonSet, and StatefulSet.
When I changed the image tags of these kinds of manifests, the sync strategy became PipelineSync.
However, I only checked the WAIT_APPROVAL stage and K8S_PRIMARY_ROLLOUT stage with example manifests in Kubernetes' official documents.
In perfect, I should check the behaviors of all stages, but I think it's enough to determine if PipelineSync is supported.

@Warashi Warashi changed the title Support Kind other than Deployment as a workload in k8s Pipeline Sync Support CronJob as PipeCD managed workload Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
Status: 📋 New
Development

No branches or pull requests

2 participants