You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/01/07 10:35:44 UTC

[GitHub] [flink] wangyang0918 commented on pull request #14570: [FLINK-20798][k8s] Use namespaced kubernetes client when creating FlinkKubeClient

wangyang0918 commented on pull request #14570:
URL: https://github.com/apache/flink/pull/14570#issuecomment-756033149


   @tillrohrmann We could not list the watch resources in Kubernetes since it is only a client behavior. Then it is impossible to add such a unit test via `KubernetesMockServer`. If we really want to check the watch is created in a specified namespace, we need to add a integration case which requires a minikube. We could create a ConfigMap in namespace `flink` and then watch it. The verification could be done in the `WatchCallbackHandler`.
   
   However, I do not think we have to add such an integration test to verify the watches behavior. Since creating a namespaced Kubernetes client is a very explicit change, we could believe that all the Kubernetes resources(e.g. Deployments, Pods, ConfigMaps, as well as the Watch) will be created in a specified namespace.
   Does it make sense?
   
   ```
   config.setNamespace(namespace);
   final NamespacedKubernetesClient client = new DefaultKubernetesClient(config);
   ```


----------------------------------------------------------------
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:
users@infra.apache.org