Artifact-level settings override the workflow-level default. The available strategies are: OnWorkflowDeletion, OnWorkflowCompletion, and Never.
- Example 1 — A workflow-level default GC strategy with an artifact-level override.
- Example 2 — A producer-consumer steps workflow that passes an artifact between steps while using a workflow-level GC policy.
- Purpose: Demonstrates setting a default artifact GC strategy at the workflow level and overriding it for a specific artifact.
- Behavior: The workflow default is
OnWorkflowDeletion. One artifact will follow that policy; another will override it toOnWorkflowCompletion.
- Purpose: Shows a multi-step workflow that produces an artifact in one step and consumes it in another.
- Behavior: The workflow-level
artifactGCis set toOnWorkflowDeletionand applies to artifacts unless individually overridden.

- workflow-level default: With
artifactGC.strategy: OnWorkflowDeletionat the workflow level, artifacts produced by that workflow are removed when the workflow is deleted. - artifact-level overrides: To change behavior for specific artifacts, set
artifactGC.strategyon the artifact:Never— retain the artifact regardless of workflow deletion.OnWorkflowCompletion— delete the artifact when the workflow completes (not waiting for deletion).OnWorkflowDeletion— delete the artifact only when the workflow is deleted (this is the default in our examples).
- precedence: Artifact-level settings always override the workflow-level default.
| Strategy | When the artifact is deleted | Use case |
|---|---|---|
| OnWorkflowDeletion | When the workflow is deleted | Default for ephemeral artifacts tied to a workflow lifecycle |
| OnWorkflowCompletion | Immediately after workflow completes | Artifacts needed only during runtime or post-processing |
| Never | Not deleted by GC | Long-term storage or archival artifacts |
- Submit the workflow (for example via the Argo UI or
kubectl). The produced artifact is stored in the configured artifact store (e.g., MinIO) under the workflow’s folder/bucket. - Inspect the artifact store to confirm artifact presence while the workflow exists or after completion.
- Delete the workflow:
- Artifacts with
OnWorkflowDeletionwill be removed by the garbage collector. - Artifacts with
NeverorOnWorkflowCompletionwill follow their explicit artifact-level setting and may remain or be removed based on that configuration.
- Artifacts with
- Use workflow-level defaults to enforce cluster-wide conventions for ephemeral artifacts.
- Override per-artifact when specific artifacts must be retained or cleaned up at a different time.
- Monitor your artifact store capacity and configure lifecycle rules as needed in addition to Argo GC for long-term retention policies.
- Argo Workflows documentation — Artifact Garbage Collection
- MinIO — High performance object storage
- Kubernetes Documentation