tillrohrmann commented on a change in pull request #15480:
URL: https://github.com/apache/flink/pull/15480#discussion_r607754545
##########
File path:
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/FlinkKubeClientFactory.java
##########
@@ -92,13 +94,32 @@ public FlinkKubeClient fromConfiguration(Configuration
flinkConfig, String useCa
LOG.debug("Setting namespace of Kubernetes client to {}", namespace);
config.setNamespace(namespace);
+ // This could be removed after we bump the fabric8 Kubernetes client
version to 4.13.0+ or
+ // use the a shared connection for all ConfigMap watches. See
FLINK-22006 for more
+ // information.
+ trySetMaxConcurrentRequest(config);
+
final NamespacedKubernetesClient client = new
DefaultKubernetesClient(config);
final int poolSize =
flinkConfig.get(KubernetesConfigOptions.KUBERNETES_CLIENT_IO_EXECUTOR_POOL_SIZE);
return new Fabric8FlinkKubeClient(
flinkConfig, client, createThreadPoolForAsyncIO(poolSize,
useCase));
}
+ @VisibleForTesting
+ static void trySetMaxConcurrentRequest(Config config) {
+ final String configuredMaxConcurrentRequests =
+ Utils.getSystemPropertyOrEnvVar(
+ Config.KUBERNETES_MAX_CONCURRENT_REQUESTS,
+
String.valueOf(Config.DEFAULT_MAX_CONCURRENT_REQUESTS));
Review comment:
Ok, then let's add a section about how to configure the Fabric8 kube
client to `native_kubernetes.md` where we state how to set these experts
options and also tell explicitly about `KUBERNETES_MAX_CONCURRENT_REQUESTS` if
users want to submit a lot of jobs.
--
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]