Skip to content

Commit 07857e1

Browse files
author
Mladen Rusev
committed
wait for pod killed, not deployment status
1 parent 94874d8 commit 07857e1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hack/e2e/test.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,12 @@ getCertificate() {
250250
# Wait 5 minutes for the certificate to appear.
251251
for ((i=0;;i++)); do if getCertificate; then exit 0; fi; sleep 30; done | timeout -v -- 5m cat
252252

253+
export AGENT_POD_NAME=$(kubectl get pods -n venafi -l app.kubernetes.io/name=venafi-kubernetes-agent -o jsonpath="{.items[0].metadata.name}")
253254
echo "Scaling down agent deployment to kill pod and flush coverage to the PVC..."
254255
kubectl scale deployment venafi-kubernetes-agent -n venafi --replicas=0
255-
echo "Waiting for agent pod to terminate..."
256-
kubectl wait deployment venafi-kubernetes-agent -n venafi --for=condition=scaled --timeout=60s
256+
echo "Waiting for agent pod '${AGENT_POD_NAME}' to terminate as a result of the scale-down..."
257+
kubectl wait --for=delete pod/${AGENT_POD_NAME} -n venafi --timeout=90s
258+
echo "Starting helper pod to retrieve coverage files from the PVC..."
257259

258260
kubectl apply -n venafi -f - <<EOF
259261
apiVersion: v1

0 commit comments

Comments
 (0)