Skip to content

Commit 4f30356

Browse files
committed
fix gateway thing
Signed-off-by: Milind Waykole <mwaykole@redhat.com>
1 parent 222714f commit 4f30356

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

tests/model_serving/model_server/llmd/conftest.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from utilities.constants import Timeout
1313
from utilities.infra import s3_endpoint_secret
14-
from utilities.llmd_utils import create_gateway, create_llmisvc
14+
from utilities.llmd_utils import create_llmd_gateway, create_llmisvc
1515
from utilities.llmd_constants import (
1616
DEFAULT_GATEWAY_NAMESPACE,
1717
VLLM_STORAGE_OCI,
@@ -68,21 +68,22 @@ def llmd_gateway(
6868
gateway_namespace: str,
6969
) -> Generator[Gateway, None, None]:
7070
"""
71-
Pytest fixture for LLMD Gateway management.
72-
73-
Implements persistent gateway strategy:
74-
- Reuses existing gateways if available
71+
Pytest fixture for LLMD Gateway management using create_llmd_gateway.
72+
73+
Implements persistent LLMD gateway strategy:
74+
- Reuses existing gateways if available
7575
- Creates new gateway only if needed
7676
- Does not delete gateway in teardown
77+
- Uses LLMD-specific gateway configuration
7778
"""
7879
if isinstance(request.param, str):
7980
gateway_class_name = request.param
8081
kwargs = {}
8182
else:
8283
gateway_class_name = request.param.get("gateway_class_name", "openshift-default")
8384
kwargs = {k: v for k, v in request.param.items() if k != "gateway_class_name"}
84-
85-
with create_gateway(
85+
86+
with create_llmd_gateway(
8687
client=admin_client,
8788
namespace=gateway_namespace,
8889
gateway_class_name=gateway_class_name,

utilities/llmd_utils.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131

3232
@contextmanager
33-
def create_gateway(
33+
def create_llmd_gateway(
3434
client: DynamicClient,
3535
name: str = DEFAULT_GATEWAY_NAME,
3636
namespace: str = DEFAULT_GATEWAY_NAMESPACE,
@@ -42,17 +42,18 @@ def create_gateway(
4242
teardown: bool = False,
4343
) -> Generator[Gateway, None, None]:
4444
"""
45-
Context manager to create and manage a Gateway resource using ocp_resources.
46-
47-
This function implements smart gateway management:
45+
Context manager to create and manage LLMD Gateway resources using ocp_resources.
46+
47+
This function implements smart LLMD gateway management:
4848
- Only creates gateway if it doesn't already exist
4949
- Reuses existing gateways to avoid conflicts
5050
- Does not delete gateway in teardown (persistent gateway strategy)
51+
- Specifically designed for LLMD (LLM Deployment) infrastructure
5152
5253
Args:
5354
client: Kubernetes dynamic client
54-
name: Gateway name
55-
namespace: Gateway namespace
55+
name: Gateway name (defaults to openshift-ai-inference)
56+
namespace: Gateway namespace (defaults to openshift-ingress)
5657
gateway_class_name: The name of the GatewayClass resource
5758
listeners: List of listener configurations
5859
infrastructure: Infrastructure configuration

0 commit comments

Comments
 (0)