wangyang0918 commented on a change in pull request #15480:
URL: https://github.com/apache/flink/pull/15480#discussion_r607715665
##########
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:
Since fabric8 kubernetes-client provides many internal advanced
configuration properties[1], I do not want to introduce such a special case for
`kubernetes.max.concurrent.requests`. If you think it is a problem that we do
not have the documentation, maybe we could add a section in
`native_kubernetes.md#Flink on Kubernetes Reference`
[1].
https://github.com/fabric8io/kubernetes-client/blob/v4.9.2/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/Config.java#L65
--
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]