MortalHappiness opened a new pull request #591:
URL: https://github.com/apache/submarine/pull/591


   ### What is this PR for?
   Set OwnerReferences on resources created using the spec of submarine custom 
resources so that:
   
   1. When submarine custom resource is deleted, those resources will be 
deleted even when operator is not running
   2. We can check whether the resources are created from the spec of submarine 
or not
   
   References:
   
   1. https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#ObjectMeta
   2. 
https://github.com/kubernetes/sample-controller/blob/73e81dab82c945b087f7db1f1f4a7b50e7d92751/controller.go#L388-L403
   3. 
https://github.com/kubernetes/sample-controller/blob/73e81dab82c945b087f7db1f1f4a7b50e7d92751/controller.go#L289-L293
   
   ### What type of PR is it?
   [Feature]
   
   ### Todos
   
   ### What is the Jira issue?
   https://issues.apache.org/jira/browse/SUBMARINE-830
   
   ### How should this be tested?
   
   1. Run the operator
   2. Create a submarine custom resource
   3. Stop the operator
   4. Delete the submarine custom resource, and then all resoures created 
(except for resources created by helm) will be deleted
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * Do the license files need updating? No
   * Are there breaking changes for older versions? No
   * Does this need new documentation? 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.

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


Reply via email to