Verified Commit ce1e8f02 authored by justin's avatar justin
Browse files

Initial commit with backup cronjob.

parents
Pipeline #578 passed with stage
in 17 seconds
/secrets/
variables:
GOOGLE_APPLICATION_CREDENTIALS: /secret/keyfile.json
k8s-deploy:
stage: deploy
image: lachlanevenson/k8s-kubectl
script:
- kubectl apply -f deploy/kubectl-apply/gke
only:
- master
tags:
- k8s
- gke
- west1-b
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: rclone-gitlab-backups-to-dropbox
namespace: gitlab
spec:
schedule: "0 7 * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: rclone-to-dropbox
image: rclone/rclone
args:
- --config
- /secrets/rclone-backup/rclone.conf
- --progress
- sync
- palpantlab-gcs:gke-gitlab-backups
- dropbox:gke-gitlab-backups
volumeMounts:
- name: rclone-backup-secret
mountPath: /secrets/rclone-backup
readOnly: true
volumes:
- name: rclone-backup-secret
secret:
secretName: rclone-backup
restartPolicy: OnFailure
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: rclone-gitlab-lfs-to-dropbox
namespace: gitlab
spec:
schedule: "0 7 * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: rclone-to-dropbox
image: rclone/rclone
args:
- --config
- /secrets/rclone-backup/rclone.conf
- --progress
- sync
- palpantlab-gcs:gke-gitlab-lfs
- dropbox:gke-gitlab-lfs
volumeMounts:
- name: rclone-backup-secret
mountPath: /secrets/rclone-backup
readOnly: true
volumes:
- name: rclone-backup-secret
secret:
secretName: rclone-backup
restartPolicy: OnFailure
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment