From a8bf1bc07884dacb2475dad8bddad5dfd2841a3c Mon Sep 17 00:00:00 2001 From: coutug Date: Mon, 26 Aug 2024 16:46:36 -0400 Subject: [PATCH] upda backfill to have pod ttl --- charts/substreams-sink-sql-backfill/Chart.yaml | 2 +- .../templates/workflow.yaml | 4 ++++ charts/substreams-sink-sql-backfill/values.yaml | 13 ++++++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/charts/substreams-sink-sql-backfill/Chart.yaml b/charts/substreams-sink-sql-backfill/Chart.yaml index 8534d98..59e742c 100644 --- a/charts/substreams-sink-sql-backfill/Chart.yaml +++ b/charts/substreams-sink-sql-backfill/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.4 +version: 0.1.5 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/substreams-sink-sql-backfill/templates/workflow.yaml b/charts/substreams-sink-sql-backfill/templates/workflow.yaml index 25e331a..a3e40c4 100644 --- a/charts/substreams-sink-sql-backfill/templates/workflow.yaml +++ b/charts/substreams-sink-sql-backfill/templates/workflow.yaml @@ -10,6 +10,10 @@ spec: ttlStrategy: {{- .Values.ttlStrategy | toYaml | nindent 4}} {{- end }} + {{- if .Values.podGarbageCollection }} + podGC: + {{- .Values.podGarbageCollection | toYaml | nindent 4}} + {{- end }} {{- if .Values.nodeAffinity }} podSpecPatch: | affinity: diff --git a/charts/substreams-sink-sql-backfill/values.yaml b/charts/substreams-sink-sql-backfill/values.yaml index cb992e1..82b6d31 100644 --- a/charts/substreams-sink-sql-backfill/values.yaml +++ b/charts/substreams-sink-sql-backfill/values.yaml @@ -20,11 +20,18 @@ imagePullSecret: ghcr-cred # Make sure to use the service account that match with argo workflow server serviceAccount: argo-workflows-workflow -# Time to live for containers once the job is completed +# Time to live for workflow once it's finished ttlStrategy: - secondsAfterCompletion: 3600 + secondsAfterCompletion: 600 secondsAfterFailure: 7200 - secondsAfterSuccess: 3600 + secondsAfterSuccess: 60 + +# Time to live for pods +# https://github.com/argoproj/argo-workflows/blob/main/examples/pod-gc-strategy.yaml +podGarbageCollection: + strategy: OnPodCompletion + deleteDelayDuration: 30s + # Indicate the number of parallel jobs and the resources used by a job # This way, you can limit the total resources used with *