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 2022/04/06 15:32:07 UTC

[GitHub] [flink-kubernetes-operator] Aitozi commented on a diff in pull request #157: [FLINK-27098] hotfix: Fixes the createFlinkDepInformerEventSource namespace scope

Aitozi commented on code in PR #157:
URL: https://github.com/apache/flink-kubernetes-operator/pull/157#discussion_r844091684


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/controller/FlinkSessionJobController.java:
##########
@@ -162,8 +162,19 @@ public DeleteControl cleanup(FlinkSessionJob sessionJob, Context context) {
 
     private InformerEventSource<FlinkDeployment, FlinkSessionJob> createFlinkDepInformerEventSource(
             String name) {
+        var sharedIndexInformer =
+                ALL_NAMESPACE.equals(name)
+                        ? kubernetesClient
+                                .resources(FlinkDeployment.class)
+                                .inAnyNamespace()
+                                .runnableInformer(0)
+                        : kubernetesClient
+                                .resources(FlinkDeployment.class)
+                                .inNamespace(name)

Review Comment:
   I think we could pass the informer as the first parameter of `createFlinkDepInformerEventSource` like the `OperatorUtils#createJmDepInformerEventSource`. By this, we do not have to assume the name is the namespace



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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org