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

kaihsun 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 244fca9  SUMARINE-814. Add pytorchjob
244fca9 is described below

commit 244fca958459d229ed5cab1cb921304cad3002a2
Author: Ken Chu <[email protected]>
AuthorDate: Sun May 9 22:34:12 2021 +0800

    SUMARINE-814. Add pytorchjob
    
    ### What is this PR for?
    
    pytorch chart:
    
    
https://github.com/apache/submarine/tree/master/helm-charts/submarine/charts/pytorchjob
    
    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-814
    
    ### How should this be tested?
    
    https://www.travis-ci.com/github/Kenchu123/submarine/builds/224734346
    
    ### Screenshots (if appropriate)
    
    By operator:
    
    helm
    
    ![helm](https://i.imgur.com/bJOPwms.png)
    
    pods
    
    ![](https://i.imgur.com/DUMgcqk.png)
    
    deployments
    
    ![](https://i.imgur.com/RvcYglm.png)
    
    services
    
    ![](https://i.imgur.com/CjRZRVF.png)
    
    replicaset
    
    ![](https://i.imgur.com/rFRqWbC.png)
    
    ### Questions:
    
    * Do the license files need updating? No
    * Are there breaking changes for older versions? No
    * Does this need new documentation? No
---
 .../examples/submarine-operator-service-account.yaml          |  2 ++
 submarine-cloud-v2/controller.go                              | 11 +++++++++++
 2 files changed, 13 insertions(+)

diff --git 
a/submarine-cloud-v2/artifacts/examples/submarine-operator-service-account.yaml 
b/submarine-cloud-v2/artifacts/examples/submarine-operator-service-account.yaml
index 0083d4a..bc7771c 100644
--- 
a/submarine-cloud-v2/artifacts/examples/submarine-operator-service-account.yaml
+++ 
b/submarine-cloud-v2/artifacts/examples/submarine-operator-service-account.yaml
@@ -42,6 +42,8 @@ rules:
       - kubeflow.org
     resources:
       - notebooks
+      - pytorchjobs
+      - tfjobs
     verbs:
       - "*"
   - apiGroups:
diff --git a/submarine-cloud-v2/controller.go b/submarine-cloud-v2/controller.go
index 975edb6..18c5aad 100644
--- a/submarine-cloud-v2/controller.go
+++ b/submarine-cloud-v2/controller.go
@@ -759,6 +759,17 @@ func (c *Controller) newSubCharts(namespace string) error {
                )
        }
 
+       if !helm.CheckRelease("pytorchjob", namespace) {
+               klog.Info("[Helm] Install pytorchjob")
+               helm.HelmInstallLocalChart(
+                       "pytorchjob",
+                       "charts/pytorchjob",
+                       "pytorchjob",
+                       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