You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by ka...@apache.org on 2021/04/15 16:12:26 UTC
[submarine] branch master updated: SUBMARINE-790. Define spec for
Submarine custom resource
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 6ad9cd3 SUBMARINE-790. Define spec for Submarine custom resource
6ad9cd3 is described below
commit 6ad9cd3ccc1f0f7b28667791bdde1d4bcdc205cf
Author: Chi-Sheng Liu <47...@users.noreply.github.com>
AuthorDate: Fri Apr 16 00:12:16 2021 +0800
SUBMARINE-790. Define spec for Submarine custom resource
### What is this PR for?
We need to define the spec for the Submarine custom resource to proceed. To achieve this, we need to
1. Update crd.yaml
2. Update example-submarine.yaml
### What type of PR is it?
[Feature]
### Todos
* [x] - Update crd.yaml
* [x] - Update example-submarine.yaml
### What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-790
### How should this be tested?
https://travis-ci.org/github/MortalHappiness/submarine/builds/766819270
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
---
submarine-cloud-v2/artifacts/examples/crd.yaml | 76 ++++++++++++++++++++++
.../artifacts/examples/example-submarine.yaml | 36 +++++++++-
2 files changed, 111 insertions(+), 1 deletion(-)
diff --git a/submarine-cloud-v2/artifacts/examples/crd.yaml b/submarine-cloud-v2/artifacts/examples/crd.yaml
index 66b63e4..0f88216 100644
--- a/submarine-cloud-v2/artifacts/examples/crd.yaml
+++ b/submarine-cloud-v2/artifacts/examples/crd.yaml
@@ -1,3 +1,20 @@
+#
+# 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: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
@@ -9,3 +26,62 @@ spec:
kind: Submarine
plural: submarines
scope: Namespaced
+ validation:
+ openAPIV3Schema:
+ type: object
+ required: ["spec"]
+ properties:
+ spec:
+ type: object
+ required:
+ - version
+ properties:
+ version: # submarine docker image version
+ type: string
+ replicas:
+ type: integer
+ minimum: 1
+ server:
+ type: object
+ properties:
+ image: # Use this to overwrite the image when development
+ type: string
+ replicas:
+ type: integer
+ minimum: 1
+ database:
+ type: object
+ properties:
+ image: # Use this to overwrite the image when development
+ type: string
+ replicas:
+ type: integer
+ minimum: 1
+ mysqlRootPasswordSecret:
+ type: string
+ tensorboard:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+ storageSizeGiB:
+ type: integer
+ mlflow:
+ type: object
+ properties:
+ enabled:
+ type: boolean
+ storageSizeGiB:
+ type: integer
+ storage:
+ type: object
+ properties:
+ storageType:
+ type: string
+ pattern: "^(host|nfs)$"
+ hostPath:
+ type: string
+ nfsPath:
+ type: string
+ nfsIP:
+ type: string
diff --git a/submarine-cloud-v2/artifacts/examples/example-submarine.yaml b/submarine-cloud-v2/artifacts/examples/example-submarine.yaml
index 4043fcc..6a2030d 100644
--- a/submarine-cloud-v2/artifacts/examples/example-submarine.yaml
+++ b/submarine-cloud-v2/artifacts/examples/example-submarine.yaml
@@ -1,7 +1,41 @@
+#
+# 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: submarine.k8s.io/v1alpha1
kind: Submarine
metadata:
name: example-submarine
spec:
- deploymentName: example-submarine
+ version: "0.6.0-SNAPSHOT"
replicas: 1
+ server:
+ # image: "apache/submarine:server-0.6.0-SNAPSHOT" # overwrite the image when development
+ replicas: 1
+ database:
+ # image: "apache/submarine:database-0.6.0-SNAPSHOT" # overwrite the image when development
+ replicas: 1
+ mysqlRootPasswordSecret: "root-pass-secret"
+ tensorboard:
+ enabled: true
+ storageSizeGiB: 10
+ mlflow:
+ enabled: true
+ storageSizeGiB: 10
+ storage:
+ storageType: "nfs"
+ nfsPath: "/"
+ nfsIP: 10.96.0.2
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org