open-autonomy
open-autonomy copied to clipboard
Mount persistent volumes
At present, there is no easy way to mount a build to a persistent volume.
Would be great to be able to do so;
(ideally using a similar syntax to Kubernetes, such that persistnt volumes cna easily be mounted as part of a spec).
Please see;
apiVersion: v1
kind: Pod
metadata:
name: pv-recycler
namespace: default
spec:
restartPolicy: Never
volumes:
- name: vol
hostPath:
path: /any/path/it/will/be/replaced
containers:
- name: pv-recycler
image: "registry.k8s.io/busybox"
command: ["/bin/sh", "-c", "test -e /scrub && rm -rf /scrub/..?* /scrub/.[!.]* /scrub/* && test -z \"$(ls -A /scrub)\" || exit 1"]
volumeMounts:
- name: vol
mountPath: /scrub
In the deployment (for kube) we need to pass;
mountpath
storageClassName (default can be "")
vol_name
For for docker-compose, need to be able to pass a host path.
Would be cool to have an array of volumes we can mount per agent.