Skip to content

Commit db9f209

Browse files
ams0claude
andcommitted
feat: Switch Velero to S3 backend on Mac Mini for full PVC backup support
Replace local-volume-provider with velero-plugin-for-aws pointing at RustFS on feynman.rhino-butterfly.ts.net:9000. This enables Kopia repository for proper PVC file-level backups. Credentials managed via Ansible vault as velero-s3-credentials secret. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9606220 commit db9f209

File tree

3 files changed

+40
-27
lines changed

3 files changed

+40
-27
lines changed

gitops/velero/velero-helmrelease.yaml

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,28 @@ spec:
2727
retries: 3
2828
values:
2929
initContainers:
30-
- name: velero-plugin-local-volume
31-
image: replicated/local-volume-provider:v0.6.7
30+
- name: velero-plugin-for-aws
31+
image: velero/velero-plugin-for-aws:v1.9.2
3232
imagePullPolicy: IfNotPresent
3333
volumeMounts:
3434
- mountPath: /target
3535
name: plugins
3636

3737
credentials:
38-
useSecret: false
38+
useSecret: true
39+
existingSecret: velero-s3-credentials
3940

4041
configuration:
4142
backupStorageLocation:
4243
- name: feynman
43-
provider: replicated.com/hostpath
44-
bucket: velero-backups
44+
provider: aws
45+
bucket: velero
4546
default: true
4647
accessMode: ReadWrite
4748
config:
48-
path: /mnt/feynman_velero
49-
resticRepoPrefix: /var/velero-local-volume-provider/velero-backups/restic
49+
region: us-east-1
50+
s3ForcePathStyle: "true"
51+
s3Url: http://feynman.rhino-butterfly.ts.net:9000
5052

5153
volumeSnapshotLocation: []
5254
defaultVolumesToFsBackup: true
@@ -63,14 +65,6 @@ spec:
6365
memory: 256Mi
6466
limits:
6567
memory: 1Gi
66-
extraVolumes:
67-
- name: feynman-velero
68-
hostPath:
69-
path: /mnt/feynman_velero
70-
type: DirectoryOrCreate
71-
extraVolumeMounts:
72-
- name: feynman-velero
73-
mountPath: /mnt/feynman_velero
7468

7569
resources:
7670
requests:
@@ -79,17 +73,6 @@ spec:
7973
limits:
8074
memory: 512Mi
8175

82-
# CIFS/SMB mount to Mac Mini — kernel-level mount, visible to containers
83-
extraVolumes:
84-
- name: feynman-velero
85-
hostPath:
86-
path: /mnt/feynman_velero
87-
type: DirectoryOrCreate
88-
89-
extraVolumeMounts:
90-
- name: feynman-velero
91-
mountPath: /mnt/feynman_velero
92-
9376
schedules:
9477
daily-all-apps:
9578
disabled: false

group_vars/oracle_hosts/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,8 @@ rustfs_access_key: "{{ vault_rustfs_access_key }}"
7777
rustfs_secret_key: "{{ vault_rustfs_secret_key }}"
7878

7979
# SMB mount configuration (Mac Mini)
80-
smb_password: "{{ vault_smb_password }}"
80+
smb_password: "{{ vault_smb_password }}"
81+
82+
# Velero S3 credentials (Mac Mini RustFS)
83+
velero_s3_access_key: "{{ vault_velero_s3_access_key }}"
84+
velero_s3_secret_key: "{{ vault_velero_s3_secret_key }}"

roles/flux/tasks/main.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,29 @@
283283
when:
284284
- alarik_secret_check.rc != 0
285285
- alarik_admin_password is defined
286+
287+
- name: Create velero namespace if not exists
288+
shell: kubectl create namespace velero --dry-run=client -o yaml | kubectl apply -f -
289+
changed_when: false
290+
291+
- name: Check if velero S3 credentials secret exists
292+
shell: kubectl -n velero get secret velero-s3-credentials
293+
register: velero_secret_check
294+
failed_when: false
295+
changed_when: false
296+
297+
- name: Create velero S3 credentials secret
298+
shell: |
299+
cat <<'CREDEOF' > /tmp/velero-credentials
300+
[default]
301+
aws_access_key_id={{ velero_s3_access_key }}
302+
aws_secret_access_key={{ velero_s3_secret_key }}
303+
CREDEOF
304+
kubectl -n velero create secret generic velero-s3-credentials \
305+
--from-file=cloud=/tmp/velero-credentials
306+
rm -f /tmp/velero-credentials
307+
no_log: true
308+
when:
309+
- velero_secret_check.rc != 0
310+
- velero_s3_access_key is defined
311+
- velero_s3_secret_key is defined

0 commit comments

Comments
 (0)