chenyulin0719 commented on code in PR #754:
URL: https://github.com/apache/yunikorn-k8shim/pull/754#discussion_r1439059354


##########
test/e2e/framework/helpers/k8s/k8s_utils.go:
##########
@@ -391,7 +391,13 @@ func (k *KubeCtl) DeleteNamespace(namespace string) error {
 }
 
 func (k *KubeCtl) TearDownNamespace(namespace string) error {

Review Comment:
   @chia7712 
   I'm working on extending TearDownNamespace() to cover below namespace level 
object:
   1. Deployment
   2. DaemonSet
   3. ReplicaSet
   4. StatefulSet
   5. Pods
   6. PVC
   
   >PV, PVC, pods, and jobs should be cleanup when the e2e is closing even if 
the e2e does not use such resource. 
   
   My previous thought is resource cleanup should be 'explicit'.
   ex: "If I create pvc in e2e test, I should delete it after this e2e test.  
If I don't use pvc in e2e test,  I don't need to check pvc existence.
   
   However, currently, we're not using the 'explicit' cleanup in every e2e 
test, and looks like TearDownNamespace() is the shared function to cleanup 
namespace for multiple e2e test. So I'll follow the suggestion and make it more 
generic.
   
   @brandboat Thanks for the suggestion. I've checked the 
DeleteWorkloadAndPods() only deletes one workload object per trigger. (If we 
have 10 Jobs in namespace, we would need to call DeleteWorkloadAndPods() 10 
times). Therefore, I will create a new function for each resource type.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to