Skip to content

Commit dc4a117

Browse files
test: reduce disk usage in pgbackrest-restore chainsaw test
Reduce PVC sizes from 1Gi to 256Mi and use Foreground deletion with explicit PVC cleanup waits to prevent disk exhaustion on GitHub-hosted runners.
1 parent 2dcc96d commit dc4a117

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

testing/chainsaw/e2e/pgbackrest-restore/chainsaw-test.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
connect: { name: PGCONNECT_TIMEOUT, value: '5' }
1818

1919
- name: volume
20-
value: { accessModes: [ReadWriteOnce], resources: { requests: { storage: 1Gi } } }
20+
value: { accessModes: [ReadWriteOnce], resources: { requests: { storage: 256Mi } } }
2121

2222
- name: postgrescluster
2323
value:
@@ -83,15 +83,19 @@ spec:
8383
8484
- name: 'Delete Cluster #1'
8585
description: >
86-
Delete this clone in the background to free up resources
86+
Delete this clone and wait for PVCs to be cleaned up to free disk space
8787
try:
8888
- delete:
89-
deletionPropagationPolicy: Background
90-
expect: [{ check: { (`true`): true } }]
89+
deletionPropagationPolicy: Foreground
9190
ref:
9291
apiVersion: ($postgrescluster.apiVersion)
9392
kind: PostgresCluster
9493
name: clone-one
94+
- script:
95+
content: |
96+
echo "Waiting for clone-one PVCs to be deleted..."
97+
kubectl wait --for=delete pvc -l postgres-operator.crunchydata.com/cluster=clone-one --timeout=2m || true
98+
sleep 5
9599
96100
- name: 'Update Cluster'
97101
description: >
@@ -160,15 +164,19 @@ spec:
160164
161165
- name: 'Delete Cluster #2'
162166
description: >
163-
Delete this clone in the background to free up resources
167+
Delete this clone and wait for PVCs to be cleaned up to free disk space
164168
try:
165169
- delete:
166-
deletionPropagationPolicy: Background
167-
expect: [{ check: { (`true`): true } }]
170+
deletionPropagationPolicy: Foreground
168171
ref:
169172
apiVersion: ($postgrescluster.apiVersion)
170173
kind: PostgresCluster
171174
name: clone-two
175+
- script:
176+
content: |
177+
echo "Waiting for clone-two PVCs to be deleted..."
178+
kubectl wait --for=delete pvc -l postgres-operator.crunchydata.com/cluster=clone-two --timeout=2m || true
179+
sleep 5
172180
173181
- name: 'Lose Data'
174182
description: >

0 commit comments

Comments
 (0)