Remove cleaning job
This commit is contained in:
parent
c5f39a3205
commit
284ee974bc
|
@ -127,21 +127,3 @@ spec:
|
||||||
resource:
|
resource:
|
||||||
name: memory
|
name: memory
|
||||||
targetAverageValue: 1800Mi
|
targetAverageValue: 1800Mi
|
||||||
---
|
|
||||||
apiVersion: batch/v1beta1
|
|
||||||
kind: CronJob
|
|
||||||
metadata:
|
|
||||||
name: cleaning-job
|
|
||||||
namespace: tus
|
|
||||||
spec:
|
|
||||||
schedule: "* * */1 * *"
|
|
||||||
jobTemplate:
|
|
||||||
spec:
|
|
||||||
template:
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: jobspod
|
|
||||||
image: gcr.io/transloadit-kubes/jobspod
|
|
||||||
command: ["/bin/bash", "-c"]
|
|
||||||
args: [ "kubectl exec --namespace tus $(kubectl get pods --namespace tus -l app=tusd -o go-template --template '{{range .items}}{{.metadata.name}}{{\"\\n\"}}{{end}}') -- /bin/sh -c \"find . -type f -mmin +1440 -print0 | xargs -n 200 -r -0 rm || true\""]
|
|
||||||
restartPolicy: OnFailure
|
|
Loading…
Reference in New Issue