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:17:48 UTC

[GitHub] [flink-kubernetes-operator] haoxins opened a new pull request, #157: [hotfix] Fixes the createFlinkDepInformerEventSource namespace scope

haoxins opened a new pull request, #157:
URL: https://github.com/apache/flink-kubernetes-operator/pull/157

   The error will occur if we use the operator with namespaced scope.
   
   ```
   [WARN ] Error starting org.apache.flink.kubernetes.operator.controller.FlinkSessionJobController$1@96a75da
   io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://10.16.0.1/apis/flink.apache.org/v1alpha1/namespaces/flink-operator/flinkdeployments. Message: Forbidden!Configured service account doesn't have access. Service account may have been revoked. flinkdeployments.flink.apache.org is forbidden: User "system:serviceaccount:flink-operator:flink-operator" cannot list resource "flinkdeployments" in API group "flink.apache.org" in the namespace "flink-operator".
   ```


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


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

Posted by GitBox <gi...@apache.org>.
Aitozi commented on PR #157:
URL: https://github.com/apache/flink-kubernetes-operator/pull/157#issuecomment-1091151991

   > +1
   > 
   > I will merge this PR after manual verification. @Aitozi It will be great if we could introduce an e2e test for session job after all the session job related work.
   
   Yes, I plan to add the e2e test after finishing the basic spec changing support (I will open the PR asap). 


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


[GitHub] [flink-kubernetes-operator] wangyang0918 merged pull request #157: [FLINK-27098] hotfix: Fixes the createFlinkDepInformerEventSource namespace scope

Posted by GitBox <gi...@apache.org>.
wangyang0918 merged PR #157:
URL: https://github.com/apache/flink-kubernetes-operator/pull/157


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


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

Posted by GitBox <gi...@apache.org>.
haoxins commented on code in PR #157:
URL: https://github.com/apache/flink-kubernetes-operator/pull/157#discussion_r844189824


##########
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:
   updated



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


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

Posted by GitBox <gi...@apache.org>.
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