Skip to content

Instantly share code, notes, and snippets.

@jrodan
Created October 28, 2022 14:34
Show Gist options
  • Save jrodan/8ffc234fbf857606a216bbb4f968d2fa to your computer and use it in GitHub Desktop.
Save jrodan/8ffc234fbf857606a216bbb4f968d2fa to your computer and use it in GitHub Desktop.
gphotos-sync kubernetes
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gphotos-sync-config
namespace: default
spec:
storageClassName: managed-nfs
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Mi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gphotos-sync-storage
namespace: default
spec:
storageClassName: managed-nfs
accessModes:
- ReadWriteMany
resources:
requests:
storage: 2000Mi
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: gphotos-sync
namespace: default
spec:
schedule: "0 */6 * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: gphotos-sync
image: ghcr.io/gilesknap/gphotos-sync:latest
args: ["/storage"]
volumeMounts:
- mountPath: /config
name: gphotos-sync-config
- mountPath: /storage
name: gphotos-sync-storage
volumes:
- name: gphotos-sync-config
persistentVolumeClaim:
claimName: gphotos-sync-config
- name: gphotos-sync-storage
persistentVolumeClaim:
claimName: gphotos-sync-storage
restartPolicy: OnFailure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment