Skip to content

Commit

Permalink
fix(ci): wipe persistent volume after sync
Browse files Browse the repository at this point in the history
Resolves #1438: Adding new code should reset preview LAPIS instances to blank as well as the DB
  • Loading branch information
corneliusroemer committed Mar 22, 2024
1 parent 59dc030 commit 29cab9b
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions kubernetes/loculus/templates/lapis-silo-shared-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,29 @@ spec:
resources:
requests:
storage: 1Gi
---
apiVersion: batch/v1
kind: Job
metadata:
name: clear-pvc-data
annotations:
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook-delete-policy: HookSucceeded
spec:
template:
spec:
containers:
- name: clear-data
image: alpine:latest
command: ["/bin/sh"]
args: ["-c", "rm -rf /mnt/*"]
volumeMounts:
- name: volume-to-clear
mountPath: /mnt
volumes:
- name: volume-to-clear
persistentVolumeClaim:
claimName: lapis-silo-shared-data-{{ $key }}
restartPolicy: Never
backoffLimit: 4
{{- end }}

0 comments on commit 29cab9b

Please sign in to comment.