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

Auto-delete workflows on archive #2001

Closed
danxmoran opened this issue Jan 16, 2020 · 4 comments
Closed

Auto-delete workflows on archive #2001

danxmoran opened this issue Jan 16, 2020 · 4 comments
Labels
area/gc Garbage collection, such as TTLs, retentionPolicy, delays, and more area/workflow-archive solution/workaround There's a workaround, might not be great, but exists type/feature Feature request

Comments

@danxmoran
Copy link
Contributor

danxmoran commented Jan 16, 2020

Summary

During the community meeting, I believe something was mentioned like "once a workflow is archived, you can go in and delete it". I think it'd be nice to have a config toggle that makes the behavior automatic.

Motivation

My workflows generate ~large persistent volumes, with ownership set so the volumes get deleted when the workflow is deleted. It'd be ideal if I could configure the Argo server to:

  1. Auto-archive workflows as they succeed (Ability to only archive workflows in a certain state #2000)
  2. Auto-delete archived workflows

That way volumes get cleaned up automatically in the happy path, but they're kept around for retries when things fail.

Proposal

I'm not sure about the internals, but at the config level I'd expect to see something like this:

persistence:
  archive:
    # Default: false
    autoDelete: true

Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

@simster7
Copy link
Member

cc @alexec

@alexec
Copy link
Contributor

alexec commented Jan 16, 2020

@jessesuen can this be done using TTL?

@jessesuen
Copy link
Member

Yes, this can be done using the spec.ttlStrategy feature in v2.5, or spec.ttlTimeAfterFinished prior to v2.5.

That said, I think there might be a feature in here where the controller could be configured with a "default" ttlStrategy so that all workflows fall back to (if not specified in the spec). In this case, workflows which wish to not auto-delete is could be specified as:

spec:
  ttlStrategy: {}

@tooptoop4
Copy link
Contributor

can this be closed? already implemented i believe

@agilgur5 agilgur5 added the area/gc Garbage collection, such as TTLs, retentionPolicy, delays, and more label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gc Garbage collection, such as TTLs, retentionPolicy, delays, and more area/workflow-archive solution/workaround There's a workaround, might not be great, but exists type/feature Feature request
Projects
None yet
Development

No branches or pull requests

6 participants