rancher / local-path-provisioner

Dynamically provisioning persistent local storage with Kubernetes
Apache License 2.0
2.07k stars 439 forks source link

e2e: wait for the provisioner to clean up PV resources #416

Open jan-g opened 1 month ago

jan-g commented 1 month ago

If we're unlucky, the local-path-provisioner can be killed before it has a chance to clean up orphened PVs. These may then hang around while subsequent tests run. Depending on the lexical sort order of those PVs, the typeCheckCmd in runTest may select a moribund PV, causing the test to randomly fail.

derekbit commented 3 weeks ago

The flaky failure condition seems related the cleanup order of the storageclass.

jan-g commented 3 weeks ago

It's just passing the output of kustomize into kubectl delete. Every kustomize call is (re)installing the storageclass helper.

This PR explicitly tags the storageclass stuff so that kubectl delete has a label to only ditch the pod & pvc before it waits on the cleanup completing.