wangyang0918 commented on a change in pull request #11233: [FLINK-16194][k8s] 
Refactor the Kubernetes decorator design
URL: https://github.com/apache/flink/pull/11233#discussion_r386216470
 
 

 ##########
 File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java
 ##########
 @@ -66,8 +70,52 @@ public Fabric8FlinkKubeClient(Configuration flinkConfig, 
KubernetesClient client
        }
 
        @Override
-       public void createTaskManagerPod(TaskManagerPodParameter parameter) {
-               // todo
+       public void createJobManagerComponent(KubernetesJobManagerSpecification 
kubernetesJMSpec) {
+               final Deployment deployment = kubernetesJMSpec.getDeployment();
+               final List<HasMetadata> accompanyingResources = 
kubernetesJMSpec.getAccompanyingResources();
+
+               // create Deployment
+               LOG.debug("Start to create deployment with spec {}", 
deployment.getSpec().toString());
+               final Deployment createdDeployment = this.internalClient
+                       .apps()
+                       .deployments()
+                       .inNamespace(this.nameSpace)
+                       .create(deployment);
+
+               // Note, we should use the server-side uid of the created 
Deployment for the OwnerReference.
+               setOwnerReference(createdDeployment, accompanyingResources);
 
 Review comment:
   The e2e test  `test_kubernetes_session.sh` also needs to be updated.

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


With regards,
Apache Git Services

Reply via email to