Skip to content

Commit

Permalink
Update argo workflow config to delete artifacts on wf deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
trey-stafford committed Jan 7, 2025
1 parent 85a8179 commit abac221
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/ogdc_runner/argo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Container,
Workflow,
WorkflowsService,
models,
)


Expand Down Expand Up @@ -57,6 +58,15 @@ def _configure_argo_settings() -> WorkflowsService:
f"ghcr.io/qgreenland-net/ogdc-runner:{ogdc_runner_image_tag}"
)

# Setup artifact garbage collection. This will tell argo to remove artifacts
# on workflow deletion.
global_config.set_class_defaults(
Workflow,
artifact_gc=models.ArtifactGC(
strategy="OnWorkflowDeletion",
service_account_name=argo_service_account_name,
),
)
workflows_service = WorkflowsService(host=argo_workflows_service_url)

return workflows_service
Expand Down

0 comments on commit abac221

Please sign in to comment.