Single container
This commit is contained in:
parent
e22ad6faf9
commit
3622887a3e
2 changed files with 3 additions and 22 deletions
|
@ -8,15 +8,12 @@ spec:
|
|||
spec:
|
||||
template:
|
||||
spec:
|
||||
volumes:
|
||||
- name: backup-storage
|
||||
emptyDir: {}
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: backup-container
|
||||
image: docker.sunet.se/drive/duplicity:bookworm-slim-1
|
||||
command: ["bash"]
|
||||
args: ["-c", "duplicity /backup_storage rclone://destination:$(BUCKET) --no-encryption --full-if-older-than 1M; umount /backup_storage" ]
|
||||
args: ["-c", "mkdir /backup_storage; rclone mount --daemon source:$(SOURCE_BUCKET) /backup_storage; duplicity /backup_storage rclone://destination:$(DESTINATION_BUCKET) --no-encryption --full-if-older-than 1M; umount /backup_storage"]
|
||||
env:
|
||||
- name: RCLONE_CONFIG_DESTINATION_ACL
|
||||
value: private
|
||||
|
@ -26,16 +23,6 @@ spec:
|
|||
value: s3.sto3.safedc.net
|
||||
- name: RCLONE_CONFIG_DESTINATION_PROVIDER
|
||||
value: Ceph
|
||||
volumeMounts:
|
||||
- name: backup-storage
|
||||
mountPath: /backup_storage
|
||||
mountPropagation: HostToContainer
|
||||
- name: mount-container
|
||||
image: rclone/rclone:1.69.0
|
||||
args: ["mount", "--allow-non-empty", "source:$(BUCKET)", "/backup_storage"]
|
||||
securityContext:
|
||||
privileged: true
|
||||
env:
|
||||
- name: RCLONE_CONFIG_SOURCE_ACL
|
||||
value: private
|
||||
- name: RCLONE_CONFIG_SOURCE_TYPE
|
||||
|
@ -44,7 +31,3 @@ spec:
|
|||
value: s3.sto4.safedc.net
|
||||
- name: RCLONE_CONFIG_SOURCE_PROVIDER
|
||||
value: Ceph
|
||||
volumeMounts:
|
||||
- name: backup-storage
|
||||
mountPath: /backup_storage
|
||||
mountPropagation: Bidirectional
|
||||
|
|
|
@ -12,7 +12,7 @@ spec:
|
|||
containers:
|
||||
- name: backup-container
|
||||
env:
|
||||
- name: BUCKET
|
||||
- name: DESTINATION_BUCKET
|
||||
value: "xrootd-test-mirror"
|
||||
- name: RCLONE_CONFIG_DESTINATION_ACCESS_KEY_ID
|
||||
valueFrom:
|
||||
|
@ -24,9 +24,7 @@ spec:
|
|||
secretKeyRef:
|
||||
name: xrootd-secret
|
||||
key: "destination-secret-access-key"
|
||||
- name: mount-container
|
||||
env:
|
||||
- name: BUCKET
|
||||
- name: SOURCE_BUCKET
|
||||
value: "xrootd-test"
|
||||
- name: RCLONE_CONFIG_SOURCE_ACCESS_KEY_ID
|
||||
valueFrom:
|
||||
|
|
Loading…
Add table
Reference in a new issue