You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by GitBox <gi...@apache.org> on 2019/12/09 10:57:38 UTC

[GitHub] [submarine] liuxunorg opened a new pull request #124: SUBMARINE-251. Submarine k8s operator framework initialization

liuxunorg opened a new pull request #124: SUBMARINE-251. Submarine  k8s operator framework initialization
URL: https://github.com/apache/submarine/pull/124
 
 
   ### What is this PR for?
   submarine runs the submarine server, user workspace, python interpreter, spark interpreter container in k8s through k8s CRD and operator.
   1. In CRD, we need to define custom resource types for the submarine server and user space containers, spark interpreter containers, and python interpreter.
   2. In the operator, submarine-operator monitor the status of various services in k8s and always maintain the availability of the submarine service.
   3. How to test
   ```
   # Creating a k8s environment locally using kind 
   cd submarine/submarine-cloud
   ./kind-cluster-build.sh
   
   # build submarine-operator
   cd submarine/submarine-cloud
   make build
   
   # run submarine-operator
   ./submarine-operator run config=$KUBECONFIG
   
   # install submarine-operator CRD
   cd submarine/submarine-cloud/manifests
   kubectl apply -f crd.yaml
   kubectl apply -f test1.yaml
   kubectl apply -f test2.yaml
   ```
   
   ### What type of PR is it?
   Feature
   
   ### Todos
   * [ ] - Support submarine server in submarine  k8s operator
   * [ ] - Support submarine workspace in submarine  k8s operator
   * [ ] - Support submarine python interpreter in submarine  k8s operator
   * [ ] - Support submarine spark interpreter in submarine  k8s operator
   
   ### What is the Jira issue?
   * https://issues.apache.org/jira/browse/SUBMARINE-251
   
   ### How should this be tested?
   * [CI Pass](https://travis-ci.org/liuxunorg/submarine/builds/622593996)
   
   ### Screenshots (if appropriate)
   ./submarine-operator run config=$KUBECONFIG
   ```
   ERROR: logging before flag.Parse: I1209 17:18:25.859773   32381 controller.go:75] Create event broadcaster
   ERROR: logging before flag.Parse: I1209 17:18:25.859945   32381 controller.go:92] Listen for SubmarineServer's add / update / delete events
   ERROR: logging before flag.Parse: I1209 17:18:25.859962   32381 controller.go:118] Start the controller event and start a cache data synchronization
   .....
   ERROR: logging before flag.Parse: I1209 17:18:34.961072   32381 controller.go:123] Start 10 worker
   ERROR: logging before flag.Parse: I1209 17:18:34.961111   32381 controller.go:128] worker all started
   ```
   
   kubectl apply -f crd.yaml
   ```
   customresourcedefinition.apiextensions.k8s.io/submarineservers.submarine.apache.org created
   ```
   
    kubectl apply -f test1.yaml 
   ```
   submarineserver.submarine.apache.org/test1 created
   
   ERROR: logging before flag.Parse: I1209 18:54:05.812881   36118 controller.go:167] Successfully synced 'default/test1'
   ERROR: logging before flag.Parse: I1209 18:54:05.812922   36118 event.go:281] Event(v1.ObjectReference{Kind:"SubmarineServer", Namespace:"default", Name:"test1", UID:"381d455f-1a72-11ea-b8df-0242ac110003", APIVersion:"submarine.apache.org/v1alpha1", ResourceVersion:"29626", FieldPath:""}): type: 'Normal' reason: 'Synced' SubmarineServer Object synced successfully
   ```
   
   ### Questions:
   * Does the licenses files need update? Yes/No
   * Is there breaking changes for older versions? Yes/No
   * Does this needs documentation? Yes/No
   

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org