open-autonomy icon indicating copy to clipboard operation
open-autonomy copied to clipboard

Mount persistent volumes

Open 8ball030 opened this issue 1 year ago • 0 comments

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.

8ball030 avatar Oct 06 '23 14:10 8ball030