Commit b96e5021 authored by Barnabas Busa's avatar Barnabas Busa Committed by GitHub

fix: add static port config for apache (#608)

parent 67e3da0e
......@@ -738,6 +738,11 @@ xatu_sentry_params:
- contribution_and_proof
- blob_sidecar
# 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
# Global tolerations that will be passed to all containers (unless overridden by a more specific toleration)
# Only works with Kubernetes
# Example: tolerations:
......
......@@ -79,6 +79,7 @@ def run(plan, args={}):
global_tolerations = args_with_right_defaults.global_tolerations
global_node_selectors = args_with_right_defaults.global_node_selectors
keymanager_enabled = args_with_right_defaults.keymanager_enabled
apache_port = args_with_right_defaults.apache_port
grafana_datasource_config_template = read_file(
static_files.GRAFANA_DATASOURCE_CONFIG_TEMPLATE_FILEPATH
......@@ -492,6 +493,7 @@ def run(plan, args={}):
apache.launch_apache(
plan,
el_cl_data_files_artifact_uuid,
apache_port,
all_participants,
args_with_right_defaults.participants,
global_node_selectors,
......
......@@ -137,6 +137,7 @@ xatu_sentry_params:
- voluntary_exit
- contribution_and_proof
- blob_sidecar
apache_port: 40000
global_tolerations: []
global_node_selectors: {}
keymanager_enabled: false
......
......@@ -4,7 +4,6 @@ constants = import_module("../package_io/constants.star")
SERVICE_NAME = "apache"
HTTP_PORT_ID = "http"
HTTP_PORT_NUMBER = 80
APACHE_CONFIG_FILENAME = "index.html"
APACHE_ENR_FILENAME = "boot_enr.yaml"
APACHE_ENODE_FILENAME = "bootnode.txt"
......@@ -30,6 +29,7 @@ USED_PORTS = {
def launch_apache(
plan,
el_cl_genesis_data,
apache_port,
participant_contexts,
participant_configs,
global_node_selectors,
......@@ -80,9 +80,14 @@ def launch_apache(
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)
}
config = get_config(
config_files_artifact_name,
el_cl_genesis_data,
public_ports,
bootstrap_info_files_artifact_name,
global_node_selectors,
)
......@@ -93,6 +98,7 @@ def launch_apache(
def get_config(
config_files_artifact_name,
el_cl_genesis_data,
public_ports,
bootstrap_info_files_artifact_name,
node_selectors,
):
......@@ -139,6 +145,7 @@ def get_config(
image="httpd:latest",
ports=USED_PORTS,
cmd=[cmd_str],
public_ports=public_ports,
entrypoint=["sh", "-c"],
files=files,
min_cpu=MIN_CPU,
......
......@@ -306,6 +306,7 @@ def input_parser(plan, input_args):
goomy_blob_params=struct(
goomy_blob_args=result["goomy_blob_params"]["goomy_blob_args"],
),
apache_port=result["apache_port"],
assertoor_params=struct(
image=result["assertoor_params"]["image"],
run_stability_check=result["assertoor_params"]["run_stability_check"],
......@@ -667,6 +668,7 @@ def default_input_args():
"persistent": False,
"mev_type": None,
"xatu_sentry_enabled": False,
"apache_port": 40000,
"global_tolerations": [],
"global_node_selectors": {},
"keymanager_enabled": False,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment