One more nesting level
This commit is contained in:
parent
05e94f10f0
commit
acf1971976
2 changed files with 71 additions and 67 deletions
|
@ -6,42 +6,44 @@ spec:
|
||||||
schedule: "0 0 * * *"
|
schedule: "0 0 * * *"
|
||||||
jobTemplate:
|
jobTemplate:
|
||||||
spec:
|
spec:
|
||||||
volumes:
|
template:
|
||||||
- name: backup-storage
|
spec:
|
||||||
emptyDir: {}
|
volumes:
|
||||||
restartPolicy: Never
|
|
||||||
containers:
|
|
||||||
- name: backup-container
|
|
||||||
image: docker.sunet.se/drive/duplicity:bookworm-slim-1
|
|
||||||
args: ["backup", "/backup_storage", "destination:${BUCKET}"]
|
|
||||||
env:
|
|
||||||
- name: RCLONE_CONFIG_DESTINATION_ACL
|
|
||||||
value: private
|
|
||||||
- name: RCLONE_CONFIG_DESTINATION_TYPE
|
|
||||||
value: s3
|
|
||||||
- name: RCLONE_CONFIG_DESTINATION_ENDPOINT
|
|
||||||
value: s3.sto3.safedc.net
|
|
||||||
- name: RCLONE_CONFIG_DESTINATION_PROVIDER
|
|
||||||
value: Ceph
|
|
||||||
volumeMounts:
|
|
||||||
- name: backup-storage
|
- name: backup-storage
|
||||||
mountPath: /backup_storage
|
emptyDir: {}
|
||||||
mountPropagation: HostToContainer
|
restartPolicy: Never
|
||||||
- name: mount-container
|
containers:
|
||||||
image: rclone/rclone:1.69.0
|
- name: backup-container
|
||||||
securityContext:
|
image: docker.sunet.se/drive/duplicity:bookworm-slim-1
|
||||||
privileged: true
|
args: ["backup", "/backup_storage", "destination:${BUCKET}"]
|
||||||
args: ["mount", "source:${BUCKET}", "/backup_storage"]
|
env:
|
||||||
env:
|
- name: RCLONE_CONFIG_DESTINATION_ACL
|
||||||
- name: RCLONE_CONFIG_SOURCE_ACL
|
value: private
|
||||||
value: private
|
- name: RCLONE_CONFIG_DESTINATION_TYPE
|
||||||
- name: RCLONE_CONFIG_SOURCE_TYPE
|
value: s3
|
||||||
value: s3
|
- name: RCLONE_CONFIG_DESTINATION_ENDPOINT
|
||||||
- name: RCLONE_CONFIG_SOURCE_ENDPOINT
|
value: s3.sto3.safedc.net
|
||||||
value: s3.sto4.safedc.net
|
- name: RCLONE_CONFIG_DESTINATION_PROVIDER
|
||||||
- name: RCLONE_CONFIG_SOURCE_PROVIDER
|
value: Ceph
|
||||||
value: Ceph
|
volumeMounts:
|
||||||
volumeMounts:
|
- name: backup-storage
|
||||||
- name: backup-storage
|
mountPath: /backup_storage
|
||||||
mountPath: /backup_storage
|
mountPropagation: HostToContainer
|
||||||
mountPropagation: Bidirectional
|
- name: mount-container
|
||||||
|
image: rclone/rclone:1.69.0
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
args: ["mount", "source:${BUCKET}", "/backup_storage"]
|
||||||
|
env:
|
||||||
|
- name: RCLONE_CONFIG_SOURCE_ACL
|
||||||
|
value: private
|
||||||
|
- name: RCLONE_CONFIG_SOURCE_TYPE
|
||||||
|
value: s3
|
||||||
|
- name: RCLONE_CONFIG_SOURCE_ENDPOINT
|
||||||
|
value: s3.sto4.safedc.net
|
||||||
|
- name: RCLONE_CONFIG_SOURCE_PROVIDER
|
||||||
|
value: Ceph
|
||||||
|
volumeMounts:
|
||||||
|
- name: backup-storage
|
||||||
|
mountPath: /backup_storage
|
||||||
|
mountPropagation: Bidirectional
|
||||||
|
|
|
@ -6,32 +6,34 @@ spec:
|
||||||
schedule: "0 14 * * *"
|
schedule: "0 14 * * *"
|
||||||
jobTemplate:
|
jobTemplate:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
template:
|
||||||
- name: backup-container
|
spec:
|
||||||
env:
|
containers:
|
||||||
- name: BUCKET
|
- name: backup-container
|
||||||
value: "xrootd-test-mirror"
|
env:
|
||||||
- name: RCLONE_CONFIG_DESTINATION_ACCESS_KEY_ID
|
- name: BUCKET
|
||||||
valueFrom:
|
value: "xrootd-test-mirror"
|
||||||
secretKeyRef:
|
- name: RCLONE_CONFIG_DESTINATION_ACCESS_KEY_ID
|
||||||
name: xrootd-secret
|
valueFrom:
|
||||||
key: "destination-access-key-id"
|
secretKeyRef:
|
||||||
- name: RCLONE_CONFIG_DESTINATION_SECRET_ACCESS_KEY
|
name: xrootd-secret
|
||||||
valueFrom:
|
key: "destination-access-key-id"
|
||||||
secretKeyRef:
|
- name: RCLONE_CONFIG_DESTINATION_SECRET_ACCESS_KEY
|
||||||
name: xrootd-secret
|
valueFrom:
|
||||||
key: "destination-secret-access-key"
|
secretKeyRef:
|
||||||
- name: mount-container
|
name: xrootd-secret
|
||||||
env:
|
key: "destination-secret-access-key"
|
||||||
- name: BUCKET
|
- name: mount-container
|
||||||
value: "xrootd-test"
|
env:
|
||||||
- name: RCLONE_CONFIG_SOURCE_ACCESS_KEY_ID
|
- name: BUCKET
|
||||||
valueFrom:
|
value: "xrootd-test"
|
||||||
secretKeyRef:
|
- name: RCLONE_CONFIG_SOURCE_ACCESS_KEY_ID
|
||||||
name: xrootd-secret
|
valueFrom:
|
||||||
key: "source-access-key-id"
|
secretKeyRef:
|
||||||
- name: RCLONE_CONFIG_SOURCE_SECRET_ACCESS_KEY
|
name: xrootd-secret
|
||||||
valueFrom:
|
key: "source-access-key-id"
|
||||||
secretKeyRef:
|
- name: RCLONE_CONFIG_SOURCE_SECRET_ACCESS_KEY
|
||||||
name: xrootd-secret
|
valueFrom:
|
||||||
key: "source-secret-access-key"
|
secretKeyRef:
|
||||||
|
name: xrootd-secret
|
||||||
|
key: "source-secret-access-key"
|
||||||
|
|
Loading…
Add table
Reference in a new issue