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

(PXP-9516): Add metadata-delete-expired-objects job #1941

Merged
merged 8 commits into from
Jan 11, 2023
31 changes: 31 additions & 0 deletions kube/services/jobs/delete-expired-objects-cronjob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# run with
# gen3 job run delete-expired-objects-cronjob
apiVersion: batch/v1
kind: Job
metadata:
name: delete-expired-objects
spec:
# Run once a week on Sunday, 6:00PM Chicago time == Monday, 12:00AM UTC
schedule: "0 0 * * 1"
successfulJobsHistoryLimit: 2
failedJobsHistoryLimit: 2
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
metadata:
labels:
app: gen3job
spec:
volumes:
- name: profile-creds-volume
secret:
secretName: "delete-expired-objects-g3auto"
containers:
- name: delete-expired-objects
GEN3_DELETE-EXPIRED-OBJECTS_IMAGE
imagePullPolicy: Always
volumeMounts:
- name: profile-creds-volume
mountPath: /mnt
restartPolicy: Never
24 changes: 24 additions & 0 deletions kube/services/jobs/delete-expired-objects-job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# run with
# gen3 job run delete-expired-objects-job
apiVersion: batch/v1
kind: Job
metadata:
name: delete-expired-objects
spec:
template:
metadata:
labels:
app: gen3job
spec:
volumes:
- name: profile-creds-volume
secret:
secretName: "delete-expired-objects-g3auto"
containers:
- name: delete-expired-objects
GEN3_DELETE-EXPIRED-OBJECTS_IMAGE
imagePullPolicy: Always
volumeMounts:
- name: profile-creds-volume
mountPath: /mnt
restartPolicy: Never