You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| **`claims[].postgresql.user-env`** | *string* | Name of the workload environment variable containing the user from original database pod.
171
-
| **`claims[].postgresql.password-env`** | *string* | **[REQUIRED]** Name of the workload environment variable containing the password (or mounted secret file).
| **`claims[].postgresql.db-secret`** | *dictionary* | Secret reference for database name.
175
+
| **`claims[].postgresql.db-secret.name`** | *string* | Name of the target Kubernetes Secret.
176
+
| **`claims[].postgresql.db-secret.key`** | *string* | Data key inside the Secret holding the database name value.
177
+
| **`claims[].postgresql.db-secret.namespace`** | *string* | *(Optional)* Target Secret namespace if different from current PVC namespace.
174
178
175
179
> [!CAUTION]
176
-
> **Security Warning:** The plain-text `password` key is **strictly forbidden** inside the `backup-map` to prevent plain-text credential leaks in a ConfigMap. You **must** use `password-env` to reference your workload's environment variable.
180
+
> **Security Note:** Plain-text `password` keys are strictly forbidden in `backup-map`. Always use `password-secret`.
177
181
178
182
183
+
184
+
### ConfigMap `backup-cache`
185
+
The `backup-cache` ConfigMap is an internal state tracker used during backup execution.
186
+
* It stores the initial replica counts of all scaled-down workloads before the backup starts.
187
+
* If the master script crashes, gets killed, or receives a termination signal (`SIGINT`/`SIGTERM`), it reads this cache during the recovery phase to reliably restore production workloads to their original state.
188
+
* Once the backup and restoration sequence finishes successfully, the cache is automatically purged.
189
+
190
+
191
+
### Secret `config`
192
+
The `config` Secret is the core configuration secret required to operate. It must be created prior to running backup operations and contains remote storage credentials and target metadata:
193
+
* `backup-map-namespace`: *(Optional)* The target namespace where `clustersnap-backup-map` and `clustersnap-backup-cache` are stored.
194
+
* `cluster-name`: Name descriptor of the targeted Kubernetes cluster.
195
+
* `storage-address`: Endpoint URL of the remote storage (e.g., `https://<account>.blob.core.windows.net/`).
196
+
* `storage-username`: Storage account username or Access Key.
197
+
* `storage-password`: Storage account password or Secret Access Key.
179
198
### Workflows
180
199
#### Volumes
200
+
* Run a Kubernetes job to dump content of PVC mount points
181
201
##### Export
182
-
tofill
202
+
203
+
```mermaid
204
+
stateDiagram-v2
205
+
direction LR
206
+
[*] --> Assessment: 1. Assessment
207
+
Assessment --> WaitRelease: 2. Scale to 0 & Cache
208
+
WaitRelease --> BackupJob: 3. Wait PVC Release
209
+
BackupJob --> StreamUpload: 4. Trigger Backup Job
210
+
StreamUpload --> Restoration: 5. Tar.gz Stream to Storage
211
+
Restoration --> [*]: 6. Restore Replicas
212
+
```
183
213
184
214
##### Import
185
215
tofill
186
216
187
217
188
218
#### PostgreSQL
189
-
* Run a Kubernetes job based on the original PostgreSQL image (to get same version)
219
+
* Run a Kubernetes job based on the original PostgreSQL image (to get same version) to dump databases
0 commit comments