Kenchu123 opened a new pull request #705:
URL: https://github.com/apache/submarine/pull/705


   ### What is this PR for?
   <!-- A few sentences describing the overall goals of the pull request's 
commits.
   First time? Check out the contributing guide - 
https://submarine.apache.org/contribution/contributions.html
   -->
   
   After the submarine is down, we can find that the experiment and notebook 
pods are still alive in the cluster. 
   
   Reproduce steps:
   
   1. create a submarine
   2. access to the workbench by port forwarding
   3. add notebook or experiment from the workbench
   4. delete submarine
   5. we can find out that notebooks, tfjobs, pytorchjobs and relating 
components are still alive.
   
   To fix the bug, we can maybe add onwerReferences to the created resources.
   
   Reference:
   
   ownerReference: 
https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/
   
   ps. This only works on submarine created by submarine-operator. If you use 
helm to install submarine, you should clean up by yourself.
   
   ### What type of PR is it?
   [Bug Fix]
   
   ### Todos
   * [x] - add submarine custom resource apiVersion, kind, name and uid to 
submarine-server's environment on creating deployment by submarine-operator
   * [x] - set ownerReference on creating notebooks (including 
persistentVolumeClaim, ingressroute) and MLJobs
   
   ### What is the Jira issue?
   <!-- * Open an issue on Jira https://issues.apache.org/jira/browse/SUBMARINE/
   * Put link here, and add [SUBMARINE-*Jira number*] in PR title, eg. 
`SUBMARINE-23. PR title`
   -->
   https://issues.apache.org/jira/browse/SUBMARINE-954
   
   ### How should this be tested?
   <!--
   * First time? Setup Travis CI as described on 
https://submarine.apache.org/contribution/contributions.html#continuous-integration
   * Strongly recommended: add automated unit tests for any new or changed 
behavior
   * Outline any manual steps to test the PR here.
   -->
   
   1. Follow submarine-operator 
[README.md](https://github.com/apache/submarine/tree/master/submarine-cloud-v2) 
to setup submarine
   2. Create notebooks and experiments
   3. Delete submarine custom resource
   
   And you can find out that all the stuff was deleted.
   
   ### Screenshots (if appropriate)
   
   
   
https://user-images.githubusercontent.com/17617373/128871152-854a6813-3a4a-445c-ae26-e98aae91876f.mov
   
   
   
   ### Questions:
   * Do the license files need updating? Yes/No
   * Are there breaking changes for older versions? Yes/No
   * Does this need new documentation? Yes/No
   


-- 
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