Skip to content

Commit 231f87c

Browse files
committed
♻️ Add Docker cleanup step to CI to prevent disk exhaustion
- Clean up Docker resources after operator build, before deployment - Remove: build cache, unused images, stopped containers, operator repo clone - Prevents 100% disk usage that causes kubectl timeouts - Shows before/after disk usage with df -h and docker system df
1 parent c44e303 commit 231f87c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/app-state-validation.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,25 @@ jobs:
129129
echo "✅ Operator images built and exported successfully (AMD64)"
130130
ls -lah .images/
131131
132+
- name: Clean up Docker to free disk space
133+
if: steps.cluster_mode.outputs.mode == 'kind'
134+
run: |
135+
echo "🧹 Cleaning up Docker resources to prevent disk exhaustion..."
136+
echo "Before cleanup:"
137+
df -h
138+
docker system df
139+
140+
# Remove build cache, unused images, and stopped containers
141+
docker system prune -af --volumes
142+
143+
# Remove operator repository clone to save space
144+
rm -rf /tmp/kagenti-operator
145+
146+
echo ""
147+
echo "After cleanup:"
148+
df -h
149+
docker system df
150+
132151
- name: Deploy Platform with quick-redeploy.sh
133152
if: steps.cluster_mode.outputs.mode == 'kind'
134153
run: |

0 commit comments

Comments
 (0)