zhengcanbin opened a new pull request #11715: [FLINK-16598][k8s] Respect the rest-port exposed by the external Service when retrieving Endpoint URL: https://github.com/apache/flink/pull/11715 ## What is the purpose of the change Currently, we parse the `rest.port` from the Flink `Configuration` when a user submits his jobs to an existing native Kubernetes session cluster, this is definitely wrong since we do not respect the real port exposed by the external Service created when deploying the session cluster. This PR will fix this problem. ## Brief change log - *Refactor the logic on retrieving the rest-port in the method of `Fabric8FlinkKubeClient#getRestEndpoint`* - *Introduce a new test class `KubernetesClientTestBase` which provides some tools for the Service* ## Verifying this change This change added unit tests and can be verified as follows: - *Start a native Kubernetes session cluster, by default, the rest port exposed by the rest Service is 8081* - *Then submit a job to the session cluster, but specify a different rest port via -Drest.port=8082* - *As expected, the job is successfully submitted to the session cluster* ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (no) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no) - The serializers: (no) - The runtime per-record code paths (performance sensitive): (no) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (no) - The S3 file system connector: (no) ## Documentation - Does this pull request introduce a new feature? (no)
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services