tangled
alpha
login
or
join now
sans-self.org
/
infrastructure
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
Add graceful shutdown handling for SQLite resilience
sans-self.org
1 month ago
5b2fe637
5e4e8771
+13
-1
2 changed files
expand all
collapse all
unified
split
k8s
pds
backup-cronjob.yaml
deployment.yaml
+8
-1
k8s/pds/backup-cronjob.yaml
reviewed
···
39
39
echo "backed up: ${name}-${TIMESTAMP}.sqlite"
40
40
done
41
41
42
42
-
# Sync actor repos and blobs — only uploads new/changed files
42
42
+
# Sync actor repos — only uploads new/changed files
43
43
rclone sync /pds/actors \
44
44
:s3:sans-self-net/pds/actors \
45
45
${S3_OPTS}
46
46
+
echo "synced: actors"
47
47
+
48
48
+
# Sync media blobs
49
49
+
rclone sync /pds/blocks \
50
50
+
:s3:sans-self-net/pds/blocks \
51
51
+
${S3_OPTS}
52
52
+
echo "synced: blocks"
46
53
47
54
echo "backup complete: ${TIMESTAMP}"
48
55
env:
+5
k8s/pds/deployment.yaml
reviewed
···
15
15
labels:
16
16
app: pds
17
17
spec:
18
18
+
terminationGracePeriodSeconds: 30
18
19
securityContext:
19
20
fsGroup: 1000
20
21
runAsUser: 1000
···
43
44
volumeMounts:
44
45
- name: data
45
46
mountPath: /pds
47
47
+
lifecycle:
48
48
+
preStop:
49
49
+
exec:
50
50
+
command: ["sh", "-c", "sleep 5"]
46
51
securityContext:
47
52
allowPrivilegeEscalation: false
48
53
capabilities: