This is an automated email from the ASF dual-hosted git repository.

liuxun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git


The following commit(s) were added to refs/heads/master by this push:
     new 27db85e  SUBMARINE-812. Install local tfjob chart via helm golang API
27db85e is described below

commit 27db85e9eac8ac8fec432d6eaf167be57f601948
Author: noidname01 <[email protected]>
AuthorDate: Mon May 3 23:06:48 2021 +0800

    SUBMARINE-812. Install local tfjob chart via helm golang API
    
    ### What is this PR for?
    
    Install local notebook-controller chart via Helm golang API.
    
    tfjob chart: 
https://github.com/apache/submarine/tree/master/helm-charts/submarine/charts/tfjob
    
    Helm golang API: 
https://github.com/apache/submarine/blob/master/submarine-cloud-v2/pkg/helm/helm.go
    
    ### What type of PR is it?
    Feature
    
    ### Todos
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/projects/SUBMARINE/issues/SUBMARINE-812
    
    ### How should this be tested?
    
    https://travis-ci.org/github/noidname01/submarine/builds/769329103
    
    -->
    ### Screenshots (if appropriate)
    
    Helm install
    ![helm_all](https://imgur.com/zWGCjhx.png)
    
    In-cluster operator
    
    ![operator_all](https://imgur.com/orZLGjj.png)
    
    ### Questions:
    * Do the license files need updating? No
    * Are there breaking changes for older versions? No
    * Does this need new documentation? No
    
    Author: noidname01 <[email protected]>
    
    Signed-off-by: Liu Xun <[email protected]>
    
    Closes #578 from noidname01/SUBMARINE-812 and squashes the following 
commits:
    
    4797fce [noidname01] SUBMARINE-812. Install local tfjob chart via helm 
golang API
---
 submarine-cloud-v2/controller.go | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/submarine-cloud-v2/controller.go b/submarine-cloud-v2/controller.go
index 0d8c38b..975edb6 100644
--- a/submarine-cloud-v2/controller.go
+++ b/submarine-cloud-v2/controller.go
@@ -748,6 +748,17 @@ func (c *Controller) newSubCharts(namespace string) error {
                )
        }
 
+       if !helm.CheckRelease("tfjob", namespace) {
+               klog.Info("[Helm] Install TFjob")
+               helm.HelmInstallLocalChart(
+                       "tfjob",
+                       "charts/tfjob",
+                       "tfjob",
+                       namespace,
+                       map[string]string{},
+               )
+       }
+
        // TODO: maintain "error"
        // TODO: (sample-controller) controller.go:287 ~ 293
        // TODO: port-forward

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to