[E2E Enchancement] define command line flags for different cleanup granularity
What would you like to be added:
Implement more command line flags for different cleanup granularity to make it more convenient for local run and debug flaky test case.
Now after running test/e2e/run_test.sh, infra like k8s, istio and Kmesh will not cleanup, but test applications will.
So add command line flag to implement such as:
- [x] Cleanup all components: this seems simple, just use kind to delete the testing k8s cluster. #649
- [ ] Don't cleanup test applications: we can use istio.test.nocleanup which is the flag of istio integration framework to control it. And more if it's necessary.
NOTE: If there are multiple subtasks in an issue, when submitting a PR, you shoud use fix part of #xxx instead of directly using fix #xxx which will automatically close the entire issue.
According to #649 When we do not add CLEANUP_KIND or CLEANUP_REGISTRY, cleanup will not be performed by default. How should we handle the logic of cleanup? Do we need to change it to clean up all by default?
According to #649 When we do not add
CLEANUP_KINDorCLEANUP_REGISTRY, cleanup will not be performed by default. How should we handle the logic of cleanup? Do we need to change it to clean up all by default?
It is OK not to clean up the kind cluster and registry by default.
However the test application will be deleted by default, We want flag to control the test application from being deleted. It's indeed a wrapper of istio.test.nocleanup which is used to keep the test applications and which can be used to troubleshoot when the test failed.
The second task has been fixed by #906