Skip to content

Commit

Permalink
Argo workflows's should stick around for a week or so. (kubeflow#363)
Browse files Browse the repository at this point in the history
* Argo workflows were being GC'd after 3 hours like other resources. That is
too aggressive. We want the workflows to be around longer to aid debugging.
* Fix 362
  • Loading branch information
jlewi authored and k8s-ci-robot committed Apr 19, 2019
1 parent 92ffdd0 commit 0ce809b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion py/kubeflow/testing/cleanup_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def cleanup_workflows(args):

name = w["metadata"]["name"]
age = now - start_time
if age > datetime.timedelta(hours=args.max_age_hours):
if age > datetime.timedelta(hours=args.max_wf_age_hours):
logging.info("Deleting workflow: %s", name)
is_expired = True
if not args.dryrun:
Expand Down Expand Up @@ -624,6 +624,10 @@ def main():
parser.add_argument(
"--max_age_hours", default=3, type=int, help=("The age of deployments to gc."))

parser.add_argument(
"--max_wf_age_hours", default=7*24, type=int,
help=("How long to wait before garbage collecting Argo workflows."))

parser.add_argument('--dryrun', dest='dryrun', action='store_true')
parser.add_argument('--no-dryrun', dest='dryrun', action='store_false')
parser.set_defaults(dryrun=False)
Expand Down

0 comments on commit 0ce809b

Please sign in to comment.