wangyang0918 commented on a change in pull request #13644:
URL: https://github.com/apache/flink/pull/13644#discussion_r507479524



##########
File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/FlinkKubeClient.java
##########
@@ -104,6 +107,67 @@ KubernetesWatch watchPodsAndDoCallback(
                Map<String, String> labels,
                WatchCallbackHandler<KubernetesPod> podCallbackHandler);
 
+       /**
+        * Create the ConfigMap with specified content. If the ConfigMap 
already exists, nothing will happen.
+        *
+        * @param configMap ConfigMap.
+        *
+        * @return Return the ConfigMap create future.
+        */
+       CompletableFuture<Void> createConfigMap(KubernetesConfigMap configMap);

Review comment:
       After a serious consideration, I decide to change the behavior of 
`CreateConfigMap`. If it is already existing, a `FlinkRuntimeExeception` will 
be thrown. Because the existing ConfigMap may be created externally wrongly and 
this will make the Flink cluster works not as expected. Moreover, only the 
leader could create the ConfigMap. We will not run into the concurrent 
modification.
   
   So the name will still be `createConfigMap`.




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