This is an automated email from the ASF dual-hosted git repository. pingsutw 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 4eddb4a SUBMARINE-1148. Persist kind cluster data in local directory 4eddb4a is described below commit 4eddb4a4daa11196598baf4181b010f5466934a1 Author: Kevin Su <pings...@apache.org> AuthorDate: Mon Dec 20 12:36:13 2021 +0800 SUBMARINE-1148. Persist kind cluster data in local directory Signed-off-by: Kevin Su <pingsutwapache.org> ### What is this PR for? <!-- A few sentences describing the overall goals of the pull request's commits. First time? Check out the contributing guide - https://submarine.apache.org/contribution/contributions.html --> Add a new helm chart value.yaml, so that the users can directly apply this YAML to install submarine in the kind cluster, and install PV if using [Local volumes](https://kubernetes.io/docs/concepts/storage/storage-classes/#local) ### What type of PR is it? [Improvement] ### Todos * [ ] - Task ### What is the Jira issue? <!-- * Open an issue on Jira https://issues.apache.org/jira/browse/SUBMARINE/ * Put link here, and add [SUBMARINE-*Jira number*] in PR title, eg. `SUBMARINE-23. PR title` --> https://issues.apache.org/jira/browse/SUBMARINE-1148 ### How should this be tested? <!-- * First time? Setup Travis CI as described on https://submarine.apache.org/contribution/contributions.html#continuous-integration * Strongly recommended: add automated unit tests for any new or changed behavior * Outline any manual steps to test the PR here. --> pass the CIs ### 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 Author: Kevin Su <pings...@apache.org> Signed-off-by: Kevin <pings...@apache.org> Closes #840 from pingsutw/kind-config and squashes the following commits: ebc55caa [Kevin Su] Update kind config 16581620 [Kevin Su] Persist kind cluster data --- dev-support/kind-config.yaml | 22 +++++++ helm-charts/submarine/kind-values.yaml | 32 ++++++++++ helm-charts/submarine/templates/pv.yaml | 101 ++++++++++++++++++++++++++++++++ 3 files changed, 155 insertions(+) diff --git a/dev-support/kind-config.yaml b/dev-support/kind-config.yaml new file mode 100644 index 0000000..c062cc7 --- /dev/null +++ b/dev-support/kind-config.yaml @@ -0,0 +1,22 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: +- role: control-plane + kubeadmConfigPatches: + - | + kind: InitConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true" + authorization-mode: "AlwaysAllow" + extraPortMappings: + - containerPort: 32080 + hostPort: 32080 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP + extraMounts: + - hostPath: /mnt/data + containerPath: /submarine + diff --git a/helm-charts/submarine/kind-values.yaml b/helm-charts/submarine/kind-values.yaml new file mode 100644 index 0000000..6adcff5 --- /dev/null +++ b/helm-charts/submarine/kind-values.yaml @@ -0,0 +1,32 @@ +# +# 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. +# + +name: submarine-operator +replicas: 1 +image: apache/submarine:operator-0.7.0-SNAPSHOT +# dev is to tell helm to install submarine-operator or not +dev: false +# storageClass is for dynamically creating persistent volumes +storageClass: + # reclaimPolicy is to determine the action after the persistent volume is released + reclaimPolicy: Delete + # volumeBindingMode controls when volume binding and dynamically provisioning should occur + volumeBindingMode: WaitForFirstConsumer + # provisioner is to determine what volume plugin is used for provisioning PVs + provisioner: kubernetes.io/no-provisioner + # parameters describe volumes belonging to the storage class + parameters: diff --git a/helm-charts/submarine/templates/pv.yaml b/helm-charts/submarine/templates/pv.yaml new file mode 100644 index 0000000..f138ed9 --- /dev/null +++ b/helm-charts/submarine/templates/pv.yaml @@ -0,0 +1,101 @@ +{{- if eq .Values.storageClass.provisioner "kubernetes.io/no-provisioner"}} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: database-pv + labels: + type: local +spec: + storageClassName: submarine-storageclass + capacity: + storage: 10Gi + accessModes: + - ReadWriteOnce + local: + path: /submarine + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - kind-control-plane + +--- + +apiVersion: v1 +kind: PersistentVolume +metadata: + name: minio-pv + labels: + type: local +spec: + storageClassName: submarine-storageclass + capacity: + storage: 10Gi + accessModes: + - ReadWriteOnce + local: + path: /submarine + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - kind-control-plane + +--- + +apiVersion: v1 +kind: PersistentVolume +metadata: + name: mlflow-pv + labels: + type: local +spec: + storageClassName: submarine-storageclass + capacity: + storage: 10Gi + accessModes: + - ReadWriteOnce + local: + path: /submarine + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - kind-control-plane + +--- + +apiVersion: v1 +kind: PersistentVolume +metadata: + name: tensorboard-pv + labels: + type: local +spec: + storageClassName: submarine-storageclass + capacity: + storage: 10Gi + accessModes: + - ReadWriteOnce + local: + path: /submarine + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - kind-control-plane + +{{- end }} + --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org For additional commands, e-mail: dev-h...@submarine.apache.org