Open cscetbon opened 3 years ago
I believe that kuttl cleans only the namespace in which the tests are run. Any reason why you're creating pod in a different namespace?
Because I can’t create namespace on the fly, I don’t have the permissions, so the idea is to have a set of existing namespaces that can be used exclusively for the tests with the exact same configuration on prod, meaning all the missing permissions etc... I still see kuttl creating namespaces on my local k8s but it uses the provided namespaces in my declared objects. They just get created and deleted with nothing inside as far as I can tell. I also see objects get deleted but not all created objects which doesn’t make sense to me. If it deleted some of them why not all of them.
I also run into the same case, only one resource of a test case is deleted, others left.
Logged in #397 as well. In our case, we need to test cluster-scoped resources as well. We honestly don't need kuttl to create any Namespaces on demand as we expect to hard-code those in the resource definitions themselves. We simply need a way for kuttl to clean up any resources we ask it to create, irrespective of the final test result (success or failure). The problem with a workaround is when the test fails, we cannot proceed to a final step which uses a Command declaration to manually remove the resources since there's no setting to continue on failure (only to ignore failure, which converts fail => success).
What happened: When test is done an object is still there
What you expected to happen: I'd expect kuttl to delete all objects created during a test case, in my case pod1 and pod2, and not only pod2.
How to reproduce it (as minimally and precisely as possible): have the following structure multi-resources ├── 00-assert.yaml ├── 00-pod1.yaml ├── 01-assert.yaml └── 01-pod2.yaml
with the following files https://gist.github.com/cscetbon/3064597e8cb51af2d3efdd6b81a80b4c
Anything else we need to know?: Here are the logs from kuttl
Environment:
kubectl version
):kubectl kuttl version
):