Skip to content

Commit

Permalink
Support for HTTP2 mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ankit864 committed Jan 9, 2025
1 parent ceb820d commit a42e4a8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion paasta_tools/cli/cmds/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def get_deployments_strings(service: str, soa_dir: str) -> List[str]:
link = PaastaColors.cyan(
"%s://paasta-%s.yelp:%d/" % (service_mode, cluster, service_port)
)
elif service_mode == "http" or service_mode == "https":
elif service_mode in ("http", "https", "http2"):
link = PaastaColors.cyan(
f"{service_mode}://{service}.paasta-{cluster}.yelp/"
)
Expand Down
2 changes: 1 addition & 1 deletion paasta_tools/cli/cmds/local_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def run_healthcheck_on_container(
healthcheck_result = perform_cmd_healthcheck(
docker_client, container_id, healthcheck_data, timeout
)
elif healthcheck_mode == "http" or healthcheck_mode == "https":
elif healthcheck_mode in ("http", "https", "http2"):
healthcheck_result = perform_http_healthcheck(healthcheck_data, timeout)
elif healthcheck_mode == "tcp":
healthcheck_result = perform_tcp_healthcheck(healthcheck_data, timeout)
Expand Down
3 changes: 1 addition & 2 deletions paasta_tools/kubernetes_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1370,8 +1370,7 @@ def get_liveness_probe(
period_seconds=period_seconds,
timeout_seconds=timeout_seconds,
)

if mode == "http" or mode == "https":
if mode in ("http", "https", "http2"):
path = self.get_healthcheck_uri(service_namespace_config)
probe.http_get = V1HTTPGetAction(
path=path, port=self.get_container_port(), scheme=mode.upper()
Expand Down
2 changes: 1 addition & 1 deletion paasta_tools/long_running_service_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def get_healthcheck_for_instance(
mode = service_manifest.get_healthcheck_mode(smartstack_config)
hostname = socket.getfqdn()

if mode == "http" or mode == "https":
if mode in ("http", "https", "http2"):
path = service_manifest.get_healthcheck_uri(smartstack_config)
healthcheck_command = "%s://%s:%d%s" % (mode, hostname, random_port, path)
elif mode == "tcp":
Expand Down

0 comments on commit a42e4a8

Please sign in to comment.