pingsutw commented on a change in pull request #498:
URL: https://github.com/apache/submarine/pull/498#discussion_r564540341



##########
File path: docs/userdocs/k8s/helm.md
##########
@@ -78,6 +78,56 @@ submarine-traefik-9bb6f8577-66sx6                 1/1     
Running   0          5
 tf-job-operator-7844656dd-lfgmd                   1/1     Running   0          
5s
 ```
 
+### Configure volume type
+Submarine can support various [volume 
types](https://kubernetes.io/docs/concepts/storage/volumes/#nfs), currently 
including hostPath (default) and NFS. It can be easily configured in the 
`./helm-charts/submarine/values.yaml`, or you can override the default values 
in `values.yaml` by [helm CLI](https://helm.sh/docs/helm/helm_install/).
+
+#### hostPath
+- In hostPath, you can store data directly in your node.
+- Usage:
+  1. Configure setting in `./helm-charts/submarine/values.yaml`.
+  2. To enable hostPath storage, set `.storage.type` to `host`.
+  3. To set the root path for your storage, set `.storage.host.root` to 
`<any-path>`
+- Example:
+  ```yaml
+  # ./helm-charts/submarine/values.yaml
+  storage:
+    type: host
+    host:
+      root: /tmp

Review comment:
       Same here. 
   ```suggestion
         root: ~/.submarine
   ```

##########
File path: dev-support/nfs-server/nfs-server.yaml
##########
@@ -0,0 +1,68 @@
+#
+# 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.
+#
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: nfs-server
+spec:
+  type: ClusterIP
+  clusterIP: 10.96.0.2
+  ports:
+    - name: nfs
+      port: 2049
+    - name: mountd
+      port: 20048
+    - name: rpcbind
+      port: 111
+  selector:
+    role: nfs-server
+---
+kind: Deployment
+apiVersion: apps/v1
+metadata:
+  name: nfs-server
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      role: nfs-server
+  template:
+    metadata:
+      name: nfs-server
+      labels:
+        role: nfs-server
+    spec:
+      containers:
+      - name: nfs-server
+        image: k8s.gcr.io/volume-nfs:0.8
+        ports:
+          - name: nfs
+            containerPort: 2049
+          - name: mountd
+            containerPort: 20048
+          - name: rpcbind
+            containerPort: 111
+        securityContext:
+          privileged: true
+        volumeMounts:
+          - mountPath: /exports
+            name: nfs-vol
+      volumes:
+        - name: nfs-vol
+          hostPath:
+            path: /tmp/nfs-vol

Review comment:
       I think it's better to store data in `~/.submarine/nfs-vol` instead of 
`/tmp`

##########
File path: helm-charts/submarine/values.yaml
##########
@@ -31,3 +31,9 @@ submarine:
     mysqlRootPassword: password
   traefik:
     enabled: true
+  storage:
+    type: host # "host" or "nfs"
+    host:
+      root: /tmp

Review comment:
       ```suggestion
         root: ~/.submarine
   ```




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