wangyang0918 commented on a change in pull request #13644:
URL: https://github.com/apache/flink/pull/13644#discussion_r506243026
##########
File path:
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java
##########
@@ -219,6 +230,68 @@ public KubernetesWatch watchPodsAndDoCallback(
.watch(new
KubernetesPodsWatcher(podCallbackHandler)));
}
+ @Override
+ public CompletableFuture<Void> createConfigMap(KubernetesConfigMap
configMap) {
+ return CompletableFuture.runAsync(
+ () -> {
+ if
(!getConfigMap(configMap.getName()).isPresent()) {
+
this.internalClient.configMaps().create(configMap.getInternalResource());
+ }
Review comment:
If the ConfigMap already exists, the create operation will fail. Since
the existing ConfigMap may be created externally. So I will throw a
`FlinkRuntimeException` when creating ConfigMap failed.
----------------------------------------------------------------
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]