Stop the kind cluster when created for integration tests
@@ -201,7 +201,10 @@ integration-in-kind: skaffold-builder
--network kind \
gcr.io/$(GCP_PROJECT)/skaffold-builder \
sh -eu -c ' \
- kind get clusters | grep -q kind || TERM=dumb kind create cluster --image=$(KIND_NODE); \
+ if ! kind get clusters | grep -q kind; then \
+ trap "kind delete cluster" 0 1 2 15; \
+ TERM=dumb kind create cluster --image=$(KIND_NODE); \
+ fi; \
kind get kubeconfig --internal > /tmp/kind-config; \
make integration \
'
