aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorchrislusf <chris.lu@gmail.com>2025-12-06 15:32:30 -0800
committerChris Lu <chrislusf@users.noreply.github.com>2025-12-06 18:53:22 -0800
commit1726e6f1792be08d02e77bfd63ba76a35119e527 (patch)
tree993c19b1bf57dedc482c72f4668defff4c4f8bf0 /.github
parentc1d7dcdd889dd063340b61499a956e18d05e0340 (diff)
downloadseaweedfs-csi-driver-1726e6f1792be08d02e77bfd63ba76a35119e527.tar.xz
seaweedfs-csi-driver-1726e6f1792be08d02e77bfd63ba76a35119e527.zip
fix: add health probes to SeaweedFS deployment in integration test
- Add readinessProbe for filer (httpGet on port 8888) - Add livenessProbe for master (httpGet on /cluster/healthz port 9333) - Increase wait timeout from 60s to 180s for deployment - Increase filer wait loop from 30 to 60 iterations (3s each) - Add pod status and logs output on failure for debugging Learned from SeaweedFS repo's e2e-mount.yml compose file which uses proper healthchecks for each service.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/integration_test.yaml36
1 files changed, 28 insertions, 8 deletions
diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml
index be9b78b..7983349 100644
--- a/.github/workflows/integration_test.yaml
+++ b/.github/workflows/integration_test.yaml
@@ -40,7 +40,7 @@ jobs:
- name: Deploy SeaweedFS
run: |
- # Deploy SeaweedFS using a simple manifest
+ # Deploy SeaweedFS using a simple manifest with proper health checks
kubectl apply -f - <<EOF
apiVersion: v1
kind: Namespace
@@ -99,6 +99,22 @@ jobs:
- containerPort: 8888
- containerPort: 18888
- containerPort: 8333
+ readinessProbe:
+ httpGet:
+ path: /
+ port: 8888
+ initialDelaySeconds: 10
+ periodSeconds: 5
+ timeoutSeconds: 5
+ failureThreshold: 30
+ livenessProbe:
+ httpGet:
+ path: /cluster/healthz
+ port: 9333
+ initialDelaySeconds: 20
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 3
volumeMounts:
- name: data
mountPath: /data
@@ -107,21 +123,25 @@ jobs:
emptyDir: {}
EOF
- # Wait for SeaweedFS to be ready
- kubectl wait --for=condition=available --timeout=120s deployment/seaweedfs -n seaweedfs
+ # Wait for SeaweedFS deployment to be available
+ kubectl wait --for=condition=available --timeout=180s deployment/seaweedfs -n seaweedfs
kubectl get pods -n seaweedfs
- # Wait for SeaweedFS filer to be responsive
+ # Wait for SeaweedFS filer to be responsive (readiness probe ensures this)
echo "Waiting for SeaweedFS filer to be ready..."
- for i in {1..30}; do
- if kubectl exec -n seaweedfs deploy/seaweedfs -- wget -q -O- http://localhost:8888/; then
+ for i in {1..60}; do
+ if kubectl exec -n seaweedfs deploy/seaweedfs -- wget -q -O- http://localhost:8888/ 2>/dev/null; then
echo "SeaweedFS filer is ready"
exit 0
fi
- echo "Waiting for filer... ($i/30)"
- sleep 2
+ echo "Waiting for filer... ($i/60)"
+ sleep 3
done
echo "SeaweedFS filer did not become ready in time"
+ echo "=== Pod Status ==="
+ kubectl get pods -n seaweedfs -o wide
+ echo "=== Pod Logs ==="
+ kubectl logs -n seaweedfs -l app=seaweedfs --tail=100
exit 1
- name: Deploy CSI Driver