bcgov / nr-fom

Forestry Operations Map
Apache License 2.0
0 stars 1 forks source link

feat: pvc mounting script and template #708

Open DerekRoberts opened 1 day ago

DerekRoberts commented 1 day ago

Idea and template courtesy of @craigyu.

apiVersion: v1
kind: Pod
metadata:
    name: pvc-inspect-pod
    namespace: a4b31c-test
spec:
    containers:
        - name: pvc-inspector
          image: busybox
          command: ["sleep", "3600"]
          volumeMounts:
              - mountPath: "/mnt/pvc"
                name: db-backup-pvc
    volumes:
        - name: db-backup-pvc
          persistentVolumeClaim:
              claimName: fom-test-database-backup
    restartPolicy: Never
paulushcgcj commented 1 day ago

Looks nice, but what's that for?

As a pod, it will always be there consuming resources, which is not great for dev env, for example, but ok for other envs.

This pod will be checking the backup folder on this pvc? What else do you think will be good to add as commands for this specific pod?

DerekRoberts commented 1 day ago

@paulushcgcj It's tied to a script and won't be long lived. Just for checking PVC backups right now.

DerekRoberts commented 1 day ago

@paulushcgcj It does give me more ideas, like scripting backup verification! Unfortunately that's out of scope for the moment.