[ https://issues.apache.org/jira/browse/FLINK-27892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17545829#comment-17545829 ]
Matyas Orhidi edited comment on FLINK-27892 at 6/3/22 10:47 AM: ---------------------------------------------------------------- Can be reproduced by submitting the same session jobs into multiplenamespaces: {{apiVersion: flink.apache.org/v1beta1}} {{kind: FlinkDeployment}} {{metadata:}} {{ name: basic-session-cluster}} {{ namespace: default}} {{spec:}} {{ image: flink:1.15}} {{ flinkVersion: v1_15}} {{ jobManager:}} {{ resource:}} {{ memory: "2048m"}} {{ cpu: 1}} {{ taskManager:}} {{ resource:}} {{ memory: "2048m"}} {{ cpu: 1}} {{ serviceAccount: flink}} {{—}} {{apiVersion: flink.apache.org/v1beta1}} {{kind: FlinkSessionJob}} {{metadata:}} {{ name: basic-session-job-example}} {{ namespace: default}} {{spec:}} {{ deploymentName: basic-session-cluster}} {{ job:}} {{ jarURI: [https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.12/1.15.0/flink-examples-streaming_2.12-1.15.0-TopSpeedWindowing.jar]}} {{ parallelism: 4}} {{ upgradeMode: stateless}} {{—}} {{apiVersion: flink.apache.org/v1beta1}} {{kind: FlinkDeployment}} {{metadata:}} {{ name: basic-session-cluster}} {{ namespace: flink}} {{spec:}} {{ image: flink:1.15}} {{ flinkVersion: v1_15}} {{ jobManager:}} {{ resource:}} {{ memory: "2048m"}} {{ cpu: 1}} {{ taskManager:}} {{ resource:}} {{ memory: "2048m"}} {{ cpu: 1}} {{ serviceAccount: flink}} {{—}} {{apiVersion: flink.apache.org/v1beta1}} {{kind: FlinkSessionJob}} {{metadata:}} {{ name: basic-session-job-example}} {{ namespace: flink}} {{spec:}} {{ deploymentName: basic-session-cluster}} {{ job:}} {{ jarURI: [https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.12/1.15.0/flink-examples-streaming_2.12-1.15.0-TopSpeedWindowing.jar]}} {{ parallelism: 4}} {{ upgradeMode: stateless}} was (Author: JIRAUSER282074): Can be reproduced by submitting the same session jobs into multiplenamespaces: ``` apiVersion: flink.apache.org/v1beta1 kind: FlinkDeployment metadata: name: basic-session-cluster namespace: default spec: image: flink:1.15 flinkVersion: v1_15 jobManager: resource: memory: "2048m" cpu: 1 taskManager: resource: memory: "2048m" cpu: 1 serviceAccount: flink --- apiVersion: flink.apache.org/v1beta1 kind: FlinkSessionJob metadata: name: basic-session-job-example namespace: default spec: deploymentName: basic-session-cluster job: jarURI: https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.12/1.15.0/flink-examples-streaming_2.12-1.15.0-TopSpeedWindowing.jar parallelism: 4 upgradeMode: stateless --- apiVersion: flink.apache.org/v1beta1 kind: FlinkDeployment metadata: name: basic-session-cluster namespace: flink spec: image: flink:1.15 flinkVersion: v1_15 jobManager: resource: memory: "2048m" cpu: 1 taskManager: resource: memory: "2048m" cpu: 1 serviceAccount: flink --- apiVersion: flink.apache.org/v1beta1 kind: FlinkSessionJob metadata: name: basic-session-job-example namespace: flink spec: deploymentName: basic-session-cluster job: jarURI: https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.12/1.15.0/flink-examples-streaming_2.12-1.15.0-TopSpeedWindowing.jar parallelism: 4 upgradeMode: stateless ``` > More than 1 secondary resource related to primary > ------------------------------------------------- > > Key: FLINK-27892 > URL: https://issues.apache.org/jira/browse/FLINK-27892 > Project: Flink > Issue Type: Bug > Components: Kubernetes Operator > Affects Versions: kubernetes-operator-1.1.0 > Reporter: Matyas Orhidi > Assignee: Matyas Orhidi > Priority: Critical > Labels: pull-request-available > Fix For: kubernetes-operator-1.1.0 > > > When submitting the `the basic-session-job.yaml' in multiple namespaces: > {{flink-kubernetes-operator java.lang.IllegalStateException: More than 1 > secondary resource related to primary flink-kubernetes-operator at > io.javaoperatorsdk.operator.processing.event.source.ResourceEventSource.getSecondaryResource(ResourceEventSource.java:19) > flink-kubernetes-operator at > io.javaoperatorsdk.operator.api.reconciler.DefaultContext.getSecondaryResource(DefaultContext.java:47) > flink-kubernetes-operator at > io.javaoperatorsdk.operator.api.reconciler.Context.getSecondaryResource(Context.java:15) > flink-kubernetes-operator at > org.apache.flink.kubernetes.operator.controller.FlinkSessionJobController.validateSessionJob(FlinkSessionJobController.java:135) > flink-kubernetes-operator at > org.apache.flink.kubernetes.operator.controller.FlinkSessionJobController.reconcile(FlinkSessionJobController.java:91) > flink-kubernetes-operator at > org.apache.flink.kubernetes.operator.controller.FlinkSessionJobController.reconcile(FlinkSessionJobController.java:51) > flink-kubernetes-operator at > io.javaoperatorsdk.operator.processing.Controller$2.execute(Controller.java:201) > flink-kubernetes-operator at > io.javaoperatorsdk.operator.processing.Controller$2.execute(Controller.java:153) > flink-kubernetes-operator at > io.javaoperatorsdk.operator.api.monitoring.Metrics.timeControllerExecution(Metrics.java:34) > flink-kubernetes-operator at > io.javaoperatorsdk.operator.processing.Controller.reconcile(Controller.java:152) > flink-kubernetes-operator at > io.javaoperatorsdk.operator.processing.event.ReconciliationDispatcher.reconcileExecution(ReconciliationDispatcher.java:135) > flink-kubernetes-operator at > io.javaoperatorsdk.operator.processing.event.ReconciliationDispatcher.handleReconcile(ReconciliationDispatcher.java:115) > flink-kubernetes-operator at > io.javaoperatorsdk.operator.processing.event.ReconciliationDispatcher.handleDispatch(ReconciliationDispatcher.java:86) > flink-kubernetes-operator at > io.javaoperatorsdk.operator.processing.event.ReconciliationDispatcher.handleExecution(ReconciliationDispatcher.java:59) > flink-kubernetes-operator at > io.javaoperatorsdk.operator.processing.event.EventProcessor$ControllerExecution.run(EventProcessor.java:390) > flink-kubernetes-operator at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) > flink-kubernetes-operator at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) > flink-kubernetes-operator at java.base/java.lang.Thread.run(Unknown Source)}} -- This message was sent by Atlassian Jira (v8.20.7#820007)