jiwq commented on a change in pull request #270:
URL: https://github.com/apache/submarine/pull/270#discussion_r421871426



##########
File path: dev-support/docker-images/submarine/build.sh
##########
@@ -35,7 +35,7 @@ submarine_dist_exists=$(find -L 
"${SUBMARINE_HOME}/submarine-dist/target" -name
 # Build source code if the package doesn't exist.
 if [[ -z "${submarine_dist_exists}" ]]; then
   cd "${SUBMARINE_HOME}"
-  mvn clean package -DskipTests
+  mvn clean package -DskipTests -pl '!submarine-cloud'

Review comment:
       Why should modifying it?

##########
File path: docs/submarine-server/setup-kubernetes.md
##########
@@ -98,6 +98,17 @@ cd <submarine_code_path_root>/dev-support/k8s/pytorchjob
 
 ```
 
+#### Use Helm Chart to deploy
+It will deploy tensorflow operator, pytorch operator, and submarine server, 
submarine database in kubernetes.
+If you want to use Helm to install submarine, you must uninstall the existing 
tensorflow operator, pytorch operator, etc. in k8s.
+
+

Review comment:
       ```suggestion
   ```

##########
File path: docs/submarine-server/setup-kubernetes.md
##########
@@ -98,6 +98,17 @@ cd <submarine_code_path_root>/dev-support/k8s/pytorchjob
 
 ```
 
+#### Use Helm Chart to deploy
+It will deploy tensorflow operator, pytorch operator, and submarine server, 
submarine database in kubernetes.
+If you want to use Helm to install submarine, you must uninstall the existing 
tensorflow operator, pytorch operator, etc. in k8s.
+
+
+##### Local
+```bash
+helm install submarine helm-charts/submarine
+```
+
+

Review comment:
       ```suggestion
   ```

##########
File path: helm-charts/submarine/templates/pytorchjob/rbac.yaml
##########
@@ -0,0 +1,69 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  labels:
+    app: pytorch-operator
+  name: pytorch-operator
+---
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRole
+metadata:
+  labels:
+    app: pytorch-operator
+  name: pytorch-operator
+rules:
+- apiGroups:
+  - kubeflow.org
+  resources:
+  - pytorchjobs
+  - pytorchjobs/status
+  verbs:
+  - '*'
+- apiGroups:
+  - apiextensions.k8s.io
+  resources:
+  - customresourcedefinitions
+  verbs:
+  - '*'
+- apiGroups:
+  - ""
+  resources:
+  - pods
+  - services
+  - endpoints
+  - events
+  verbs:
+  - '*'
+---
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+  labels:
+    app: pytorch-operator
+  name: pytorch-operator
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: pytorch-operator
+subjects:
+- kind: ServiceAccount
+  name: pytorch-operator
+  namespace: default

Review comment:
       I suggest use the built-in objects, more info see 
https://helm.sh/docs/chart_template_guide/builtin_objects/
   ```suggestion
     namespace: {{ .Release.Namespace }}
   ```

##########
File path: helm-charts/submarine/values.yaml
##########
@@ -0,0 +1,21 @@
+# Default values for submarine.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+submarine:
+  server:
+    replicas: 1
+    name: submarine-server
+    image: apache/submarine:server-0.4.0-SNAPSHOT
+    servicePort: 8080
+  database:
+    replicas: 1
+    name: submarine-database
+    image: apache/submarine:database-0.4.0-SNAPSHOT
+    servicePort: 3306
+  mysqlRootPassword: password
+
+customResourceDefinitions:

Review comment:
       Can it be deleted? 

##########
File path: helm-charts/submarine/values.yaml
##########
@@ -0,0 +1,21 @@
+# Default values for submarine.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+submarine:
+  server:
+    replicas: 1
+    name: submarine-server
+    image: apache/submarine:server-0.4.0-SNAPSHOT
+    servicePort: 8080
+  database:
+    replicas: 1
+    name: submarine-database
+    image: apache/submarine:database-0.4.0-SNAPSHOT
+    servicePort: 3306
+  mysqlRootPassword: password

Review comment:
       ```suggestion
       mysqlRootPassword: password
   ```
   The caller should modify too, if you accept.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to