From 2c6b7b1af7b7513adf46394b9138f726a57f9e38 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Mon, 13 May 2024 18:11:39 +0300 Subject: [PATCH] fix(apache): only set static port if wanted (#610) --- README.md | 4 ++-- src/apache/apache_launcher.star | 11 +++++++---- src/package_io/input_parser.star | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b5acf1b65..e2cb1efbe 100644 --- a/README.md +++ b/README.md @@ -740,8 +740,8 @@ xatu_sentry_params: # Apache params # Apache public port to port forward to local machine -# Default to port 40000, only set if apache additional service is activated -apache_port: 40000 +# Default to port None, only set if apache additional service is activated +apache_port: null # Global tolerations that will be passed to all containers (unless overridden by a more specific toleration) # Only works with Kubernetes diff --git a/src/apache/apache_launcher.star b/src/apache/apache_launcher.star index de033ddae..6cc3659d2 100644 --- a/src/apache/apache_launcher.star +++ b/src/apache/apache_launcher.star @@ -79,10 +79,13 @@ def launch_apache( bootstrap_info_files_artifact_name = plan.render_templates( template_and_data_by_rel_dest_filepath, "bootstrap-info" ) - - public_ports = { - HTTP_PORT_ID: shared_utils.new_port_spec(apache_port, shared_utils.TCP_PROTOCOL) - } + public_ports = {} + if apache_port != None: + public_ports = { + HTTP_PORT_ID: shared_utils.new_port_spec( + apache_port, shared_utils.TCP_PROTOCOL + ) + } config = get_config( config_files_artifact_name, diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index 4fead633b..38b494955 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -668,7 +668,7 @@ def default_input_args(): "persistent": False, "mev_type": None, "xatu_sentry_enabled": False, - "apache_port": 40000, + "apache_port": None, "global_tolerations": [], "global_node_selectors": {}, "keymanager_enabled": False,