Skip to content

Commit 3acf684

Browse files
committed
tweak
1 parent 56b004a commit 3acf684

4 files changed

Lines changed: 12 additions & 37 deletions

File tree

docs/volsync-implementation-plan.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ It uses a **Service Bridge** to allow Kyverno to "look before it leaps" by check
66

77
## Core Components
88

9-
### 1. The Bridge (Service)
10-
**File:** `infrastructure/storage/volsync/rustfs-service.yaml`
11-
Maps the external NAS IP (192.168.10.133) to an internal DNS name `rustfs.volsync-system`.
12-
* **Protocol:** TCP/9000
13-
* **Purpose:** Allows policies to target `http://rustfs.volsync-system:9000/...`
9+
### 1. The Bridge (Direct IP)
10+
**Strategy:** Direct Connection
11+
Instead of creating a Kubernetes Service (which causes ArgoCD sync issues for external IPs), we connect directly to the TrueNAS IP.
12+
* **Target:** `192.168.10.133` (Port 9000)
13+
* **Benefit:** Zero-friction GitOps state (no "ExcludedResourceWarning").
1414

1515
### 2. The Credentials (ExternalSecret)
1616
**File:** `infrastructure/storage/volsync/rustfs-credentials.yaml` (Existing)
@@ -27,10 +27,9 @@ Logic: "Check for Restic Config. If found, Restore. Else, Backup."
2727

2828
**Rule 2: Smart Restore (Conditional)**
2929
* Trigger: PVC `backup: hourly`
30-
* **Context (apiCall):**
31-
* Target: `http://rustfs.volsync-system:9000/volsync-backups/<ns>/<pvc>/config`
32-
* Method: `HEAD`
33-
* Note: Checking `/config` verifies it's a valid Restic repo, not just an empty folder.
30+
* **(apiCall):**
31+
* Target: `http://192.168.10.133:9000/volsync-backups/<ns>/<pvc>/config` (Direct IP)
32+
* Method: `GET` (Kyverno compatible)
3433
* **Condition:** Response == 200 OK.
3534
* **Action:** Create `ReplicationDestination`.
3635

infrastructure/controllers/kyverno/volsync-smart-restore.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
context:
2929
- name: repoCheck
3030
apiCall:
31-
urlPath: "http://rustfs.volsync-system.svc:9000/volsync-backups/{{ request.namespace }}/{{ request.object.metadata.name }}/config"
31+
urlPath: "http://192.168.10.133:9000/volsync-backups/{{ request.namespace }}/{{ request.object.metadata.name }}/config"
3232
method: GET
3333
jmesPath: ""
3434
preconditions:
@@ -59,7 +59,7 @@ spec:
5959
context:
6060
- name: repoCheck
6161
apiCall:
62-
urlPath: "http://rustfs.volsync-system.svc:9000/volsync-backups/{{ request.namespace }}/{{ request.object.metadata.name }}/config"
62+
urlPath: "http://192.168.10.133:9000/volsync-backups/{{ request.namespace }}/{{ request.object.metadata.name }}/config"
6363
method: GET
6464
jmesPath: ""
6565
preconditions:
@@ -78,7 +78,7 @@ spec:
7878
trigger:
7979
manual: "restore-on-create"
8080
restic:
81-
repository: "s3:http://rustfs.volsync-system.svc:9000/volsync-backups/{{ request.object.metadata.namespace }}/{{ request.object.metadata.name }}"
81+
repository: "s3:http://192.168.10.133:9000/volsync-backups/{{ request.object.metadata.namespace }}/{{ request.object.metadata.name }}"
8282
copyMethod: Direct
8383
storageClassName: "longhorn"
8484
volumeSnapshotClassName: "longhorn"
@@ -114,7 +114,7 @@ spec:
114114
schedule: "0 * * * *"
115115
restic:
116116
pruneIntervalDays: 10
117-
repository: "s3:http://rustfs.volsync-system.svc:9000/volsync-backups/{{ request.object.metadata.namespace }}/{{ request.object.metadata.name }}"
117+
repository: "s3:http://192.168.10.133:9000/volsync-backups/{{ request.object.metadata.namespace }}/{{ request.object.metadata.name }}"
118118
copyMethod: Direct
119119
storageClassName: "longhorn"
120120
volumeSnapshotClassName: "longhorn"

infrastructure/storage/volsync/kustomization.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ resources:
55
- namespace.yaml
66
- externalsecret.yaml
77
- rustfs-credentials.yaml
8-
- rustfs-service.yaml
98
helmCharts:
109
- name: volsync
1110
repo: https://backube.github.io/helm-charts

infrastructure/storage/volsync/rustfs-service.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)