elkhand opened a new pull request, #23406: URL: https://github.com/apache/flink/pull/23406
[FLINK-32884](https://issues.apache.org/jira/browse/FLINK-32884) PyFlink remote execution should support URLs with paths and https scheme ## What is the purpose of the change Currently, the `SUBMIT_ARGS=remote -m http://<hostname>:<port>` format. For local execution it works fine `SUBMIT_ARGS=remote -m http://localhost:8081/`, but it does not support the placement of the JobManager behind a proxy or using an Ingress for routing to a specific Flink cluster based on the URL path. In the current scenario, it expects JobManager to access PyFlink jobs at `http://<hostname>:<port>/v1/jobs` endpoint. Mapping to a non-root location, `https://<hostname>:<port>/flink-clusters/namespace/flink_job_deployment/v1/jobs` is not supported. This will use changes from [FLINK-32885](https://issues.apache.org/jira/browse/FLINK-32885)(https://issues.apache.org/jira/browse/FLINK-32885) Since RestClusterClient talks to the JobManager via its REST endpoint, the right format for `SUBMIT_ARGS` is a URL with a path (also support for https scheme). ## Brief change log - Added 2 new options into RestOptions: RestOptions.PATH and RestOptions.PROTOCOL - Added `https` schema support and jobManagerUrl with path support to RestClusterClient - Added customHttpHeaders support to RestClusterClient (for example setting auth token from env variable) - Updated `NetUtils.validateHostPortString()` to handle both `http` and `https` schema for hostPort ## Verifying this change This change added tests and can be verified as follows: - Extended flink-clients/src/test/java/org/apache/flink/client/cli/DefaultCLITest.java to cover `http` and `https` schemes - Added unit test flink-core/src/test/java/org/apache/flink/util/NetUtilsTest.java to check `https` scheme and URL with path - Extended test flink-clients/src/test/java/org/apache/flink/client/program/rest/RestClusterClientTest.java to validate customHttpHeaders and jobmanagerUrl with path and `https` scheme ## 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, ZooKeeper: no - The S3 file system connector: no ## Documentation - Does this pull request introduce a new feature? no - If yes, how is the feature documented? not applicable -- 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-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org