Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated mode: http2 support #4004

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Updated mode: http2 support #4004

wants to merge 1 commit into from

Conversation

ankit864
Copy link
Contributor

@ankit864 ankit864 commented Jan 10, 2025

Support for HTTP2 mode & updated SmartStack schema.

@ankit864
Copy link
Contributor Author

@@ -1371,7 +1371,7 @@ def get_liveness_probe(
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()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mode.upper() will lead to LivenessProbe w/ scheme=HTTP which isn't supported , so we need to do some conversion here

@@ -37,7 +37,7 @@
)

# modes that depend on smartstack port cannot be tested via paasta proxies, so we exclude those
TESTABLE_SERVICE_MODES = {"http", "https"}
TESTABLE_SERVICE_MODES = {"http", "https", "http2"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_smartstack_endpoints() will probably need some special handling since that passes through the mode as the uri scheme - but the http2 scheme is still http

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and i think the same needs to happen in get_deployments_strings()?

@@ -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"]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-blocking suggestion: might be nice to have a constant for HTTP_MODES = {"http", "https", "http2"} since we have this list in multiple places

@@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(same as above re: http2 having a uri scheme of http)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants