diff --git a/config/overlays/odh/inferenceservice-config-patch.yaml b/config/overlays/odh/inferenceservice-config-patch.yaml index fd3bd1b1154..d6d68d0c6f0 100644 --- a/config/overlays/odh/inferenceservice-config-patch.yaml +++ b/config/overlays/odh/inferenceservice-config-patch.yaml @@ -77,7 +77,7 @@ data: } deploy: |- { - "defaultDeploymentMode": "Serverless" + "defaultDeploymentMode": "RawDeployment" } metricsAggregator: |- { diff --git a/config/overlays/test/dsc.yaml b/config/overlays/test/dsc.yaml index f3b9cb7ec33..761748b4f9d 100644 --- a/config/overlays/test/dsc.yaml +++ b/config/overlays/test/dsc.yaml @@ -19,11 +19,13 @@ spec: kserve: defaultDeploymentMode: Serverless managementState: Managed + nim: + managementState: Removed serving: ingressGateway: certificate: type: OpenshiftDefaultIngress - managementState: Managed + managementState: Removed name: knative-serving modelmeshserving: managementState: Removed diff --git a/python/kserve/kserve/constants/constants.py b/python/kserve/kserve/constants/constants.py index e08e2f5f2bb..851d387c98a 100644 --- a/python/kserve/kserve/constants/constants.py +++ b/python/kserve/kserve/constants/constants.py @@ -37,6 +37,10 @@ KSERVE_LOGLEVEL = os.environ.get("KSERVE_LOGLEVEL", "INFO").upper() +# KServe label constants +KSERVE_LABEL_NETWORKING_VISIBILITY = "networking.kserve.io/visibility" +KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED = "exposed" + # INFERENCESERVICE credentials common constants INFERENCESERVICE_CONFIG_MAP_NAME = "inferenceservice-config" INFERENCESERVICE_SYSTEM_NAMESPACE = "kserve" diff --git a/test/e2e/batcher/test_batcher.py b/test/e2e/batcher/test_batcher.py index 5c3a4084593..8b271db02b2 100644 --- a/test/e2e/batcher/test_batcher.py +++ b/test/e2e/batcher/test_batcher.py @@ -52,7 +52,11 @@ async def test_batcher(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) diff --git a/test/e2e/batcher/test_batcher_custom_port.py b/test/e2e/batcher/test_batcher_custom_port.py index 0b7b1f90553..70932314026 100644 --- a/test/e2e/batcher/test_batcher_custom_port.py +++ b/test/e2e/batcher/test_batcher_custom_port.py @@ -56,7 +56,11 @@ async def test_batcher_custom_port(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) diff --git a/test/e2e/common/utils.py b/test/e2e/common/utils.py index b9c442e9985..8b481b10755 100644 --- a/test/e2e/common/utils.py +++ b/test/e2e/common/utils.py @@ -43,14 +43,9 @@ def grpc_client(host, cluster_ip): if ":" not in cluster_ip: cluster_ip = cluster_ip + ":80" logger.info("Cluster IP: %s", cluster_ip) - logger.info("gRPC target host: %s", host) return InferenceGRPCClient( cluster_ip, verbose=True, - channel_args=[ - ("grpc.ssl_target_name_override", host), - ], - timeout=120, ) @@ -277,6 +272,7 @@ async def predict_grpc( if model_name is None: model_name = service_name + client = grpc_client(host, cluster_ip) response = await client.infer( @@ -312,10 +308,16 @@ def get_isvc_endpoint(isvc, network_layer: str = "istio"): scheme = urlparse(isvc["status"]["url"]).scheme host = urlparse(isvc["status"]["url"]).netloc path = urlparse(isvc["status"]["url"]).path - if os.environ.get("CI_USE_ISVC_HOST") == "1": + ci_use_isvc_host = os.environ.get("CI_USE_ISVC_HOST") + logger.info(f"CI_USE_ISVC_HOST = {ci_use_isvc_host}") + logger.info(f"Host from isvc status URL = {host}") + logger.info(f"Network layer = {network_layer}") + if ci_use_isvc_host == "1": cluster_ip = host + logger.info(f"Using external route host: {cluster_ip}") elif network_layer == "istio" or network_layer == "istio-ingress": cluster_ip = get_cluster_ip() + logger.info(f"Using internal cluster IP: {cluster_ip}") elif network_layer == "envoy-gatewayapi": cluster_ip = get_cluster_ip( namespace="envoy-gateway-system", diff --git a/test/e2e/logger/test_logger.py b/test/e2e/logger/test_logger.py index aa9016dbe25..e4093801380 100644 --- a/test/e2e/logger/test_logger.py +++ b/test/e2e/logger/test_logger.py @@ -53,7 +53,13 @@ async def test_kserve_logger(rest_v1_client): isvc = V1beta1InferenceService( api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, - metadata=client.V1ObjectMeta(name=msg_dumper, namespace=KSERVE_TEST_NAMESPACE), + metadata=client.V1ObjectMeta( + name=msg_dumper, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, + ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -65,7 +71,7 @@ async def test_kserve_logger(rest_v1_client): min_replicas=1, logger=V1beta1LoggerSpec( mode="all", - url=f"http://{msg_dumper}." + KSERVE_TEST_NAMESPACE + ".svc.cluster.local", + url=f"http://{msg_dumper}-predictor." + KSERVE_TEST_NAMESPACE + ".svc.cluster.local", ), sklearn=V1beta1SKLearnSpec( storage_uri="gs://kfserving-examples/models/sklearn/1.0/model", @@ -80,7 +86,11 @@ async def test_kserve_logger(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) diff --git a/test/e2e/predictor/test_autoscaling.py b/test/e2e/predictor/test_autoscaling.py index d8f54ac910d..8fd787229cf 100644 --- a/test/e2e/predictor/test_autoscaling.py +++ b/test/e2e/predictor/test_autoscaling.py @@ -50,6 +50,7 @@ @pytest.mark.predictor @pytest.mark.asyncio(scope="session") +@pytest.mark.skip("We do not test anymore with Knative") async def test_sklearn_kserve_concurrency(rest_v1_client): service_name = "isvc-sklearn-scale-concurrency" predictor = V1beta1PredictorSpec( @@ -68,7 +69,8 @@ async def test_sklearn_kserve_concurrency(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -94,6 +96,7 @@ async def test_sklearn_kserve_concurrency(rest_v1_client): @pytest.mark.predictor @pytest.mark.asyncio(scope="session") +@pytest.mark.skip("We do not test anymore with Knative") async def test_sklearn_kserve_rps(rest_v1_client): service_name = "isvc-sklearn-scale-rps" predictor = V1beta1PredictorSpec( @@ -113,7 +116,8 @@ async def test_sklearn_kserve_rps(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -137,7 +141,7 @@ async def test_sklearn_kserve_rps(rest_v1_client): kserve_client.delete(service_name, KSERVE_TEST_NAMESPACE) -@pytest.mark.skip() +@pytest.mark.skip("Not needed to test with knative") @pytest.mark.asyncio(scope="session") async def test_sklearn_kserve_cpu(rest_v1_client): service_name = "isvc-sklearn-scale-cpu" diff --git a/test/e2e/predictor/test_canary.py b/test/e2e/predictor/test_canary.py index 249c2b97cf2..053b05a0233 100644 --- a/test/e2e/predictor/test_canary.py +++ b/test/e2e/predictor/test_canary.py @@ -33,6 +33,7 @@ @pytest.mark.predictor @pytest.mark.path_based_routing +@pytest.mark.skip(reason="Canary rollouts require Knative Serving and are not supported in RawDeployment mode") def test_canary_rollout(): service_name = "isvc-canary" default_endpoint_spec = V1beta1InferenceServiceSpec( @@ -52,7 +53,8 @@ def test_canary_rollout(): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, ), spec=default_endpoint_spec, ) @@ -96,6 +98,7 @@ def test_canary_rollout(): @pytest.mark.predictor @pytest.mark.path_based_routing +@pytest.mark.skip(reason="Canary rollouts require Knative Serving and are not supported in RawDeployment mode") def test_canary_rollout_runtime(): service_name = "isvc-canary-runtime" default_endpoint_spec = V1beta1InferenceServiceSpec( @@ -118,7 +121,8 @@ def test_canary_rollout_runtime(): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, ), spec=default_endpoint_spec, ) diff --git a/test/e2e/predictor/test_lightgbm.py b/test/e2e/predictor/test_lightgbm.py index cfa0171b824..19ee7cbefa9 100644 --- a/test/e2e/predictor/test_lightgbm.py +++ b/test/e2e/predictor/test_lightgbm.py @@ -54,7 +54,11 @@ async def test_lightgbm_kserve(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -93,7 +97,11 @@ async def test_lightgbm_runtime_kserve(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -148,7 +156,11 @@ async def test_lightgbm_v2_runtime_mlserver(rest_v2_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -201,7 +213,11 @@ async def test_lightgbm_v2_kserve(rest_v2_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) diff --git a/test/e2e/predictor/test_mlflow.py b/test/e2e/predictor/test_mlflow.py index 4b4c2c01769..e851aaec492 100644 --- a/test/e2e/predictor/test_mlflow.py +++ b/test/e2e/predictor/test_mlflow.py @@ -61,7 +61,11 @@ async def test_mlflow_v2_runtime_kserve(rest_v2_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) diff --git a/test/e2e/predictor/test_multi_container_probing.py b/test/e2e/predictor/test_multi_container_probing.py index 17f056ef52d..e5e7c1e4aa1 100644 --- a/test/e2e/predictor/test_multi_container_probing.py +++ b/test/e2e/predictor/test_multi_container_probing.py @@ -46,13 +46,11 @@ kserve_client = KServeClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config")) -def get_ksvc(k8s_client: client.CustomObjectsApi, service_name: str) -> dict: - return k8s_client.get_namespaced_custom_object( - group="serving.knative.dev", - version="v1", - namespace=KSERVE_TEST_NAMESPACE, - plural="services", +def get_deployment(k8s_client: client.AppsV1Api, service_name: str) -> client.V1Deployment: + """Get the Kubernetes Deployment for RawDeployment mode.""" + return k8s_client.read_namespaced_deployment( name=service_name + "-predictor", + namespace=KSERVE_TEST_NAMESPACE, ) @@ -132,6 +130,9 @@ async def test_multi_container_probing(rest_v1_client): "serving.kserve.io/autoscalerClass": "none", "serving.kserve.io/DeploymentMode": "RawDeployment", }, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec( predictor=predictor, @@ -141,39 +142,39 @@ async def test_multi_container_probing(rest_v1_client): kserve_client.create(isvc) kserve_client.wait_isvc_ready(service_name, KSERVE_TEST_NAMESPACE) - # Get the Knative Service - k8s_client = client.CustomObjectsApi() + # Get the Kubernetes Deployment for RawDeployment mode + k8s_client = client.AppsV1Api() try: - for ksvc in TimeoutSampler( - wait_timeout=15, + for deployment in TimeoutSampler( + wait_timeout=60, sleep=2, - func=lambda: get_ksvc(k8s_client, service_name), + func=lambda: get_deployment(k8s_client, service_name), ): - # Wait for Ready condition to be True - if ksvc["status"].get("conditions"): - ready_condition = next( - (c for c in ksvc["status"]["conditions"] if c["type"] == "Ready"), - None, - ) - if ready_condition and ready_condition["status"] == "True": - break - # Get latest ksvc state after Ready condition is met - ready_ksvc = get_ksvc(k8s_client, service_name) - containers = ready_ksvc["spec"]["template"]["spec"]["containers"] + # Wait for Deployment to be ready + if deployment.status.ready_replicas and deployment.status.ready_replicas > 0: + break + + # Get latest deployment state after ready condition is met + ready_deployment = get_deployment(k8s_client, service_name) + containers = ready_deployment.spec.template.spec.containers + + # Find containers by name kserve_container = next( - c for c in containers if c["name"] == "kserve-container" + c for c in containers if c.name == "kserve-container" ) - kserve_agent = next(c for c in containers if c["name"] == "kserve-agent") + kserve_agent = next(c for c in containers if c.name == "kserve-agent") # Verify kserve-container probes - assert kserve_container["livenessProbe"] is not None - assert kserve_container["readinessProbe"] is not None + assert kserve_container.liveness_probe is not None + assert kserve_container.readiness_probe is not None + logger.info("kserve-container probes verified successfully") # Verify kserve-agent probes - assert kserve_agent["livenessProbe"] is not None - assert kserve_agent["readinessProbe"] is not None + assert kserve_agent.liveness_probe is not None + assert kserve_agent.readiness_probe is not None + logger.info("kserve-agent probes verified successfully") kserve_client.delete(service_name, KSERVE_TEST_NAMESPACE) except TimeoutExpiredError as e: - logger.error("Timeout waiting for ksvc to be ready") + logger.error("Timeout waiting for deployment to be ready") raise e diff --git a/test/e2e/predictor/test_paddle.py b/test/e2e/predictor/test_paddle.py index 65c161f9488..5dd3e15a51e 100644 --- a/test/e2e/predictor/test_paddle.py +++ b/test/e2e/predictor/test_paddle.py @@ -52,7 +52,13 @@ async def test_paddle(rest_v1_client): isvc = V1beta1InferenceService( api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, - metadata=V1ObjectMeta(name=service_name, namespace=KSERVE_TEST_NAMESPACE), + metadata=V1ObjectMeta( + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, + ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -100,7 +106,13 @@ async def test_paddle_runtime(rest_v1_client): isvc = V1beta1InferenceService( api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, - metadata=V1ObjectMeta(name=service_name, namespace=KSERVE_TEST_NAMESPACE), + metadata=V1ObjectMeta( + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, + ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -149,7 +161,13 @@ async def test_paddle_v2_kserve(rest_v2_client): isvc = V1beta1InferenceService( api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, - metadata=V1ObjectMeta(name=service_name, namespace=KSERVE_TEST_NAMESPACE), + metadata=V1ObjectMeta( + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, + ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) diff --git a/test/e2e/predictor/test_pmml.py b/test/e2e/predictor/test_pmml.py index f7c0922f1cb..2d7285af05d 100644 --- a/test/e2e/predictor/test_pmml.py +++ b/test/e2e/predictor/test_pmml.py @@ -51,7 +51,11 @@ async def test_pmml_kserve(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -100,7 +104,11 @@ async def test_pmml_runtime_kserve(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -146,7 +154,11 @@ async def test_pmml_v2_kserve(rest_v2_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) diff --git a/test/e2e/predictor/test_sklearn.py b/test/e2e/predictor/test_sklearn.py index 59018fa666f..b0d4d323046 100644 --- a/test/e2e/predictor/test_sklearn.py +++ b/test/e2e/predictor/test_sklearn.py @@ -59,7 +59,11 @@ async def test_sklearn_kserve(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -101,7 +105,11 @@ async def test_sklearn_v2_mlserver(rest_v2_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -146,7 +154,11 @@ async def test_sklearn_runtime_kserve(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -213,7 +225,11 @@ async def test_sklearn_v2_runtime_mlserver(rest_v2_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -258,7 +274,11 @@ async def test_sklearn_v2(rest_v2_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -302,6 +322,7 @@ async def test_sklearn_v2_grpc(): predictor = V1beta1PredictorSpec( min_replicas=1, model=V1beta1ModelSpec( + protocol_version="grpc-v2", model_format=V1beta1ModelFormat( name="sklearn", ), @@ -320,7 +341,11 @@ async def test_sklearn_v2_grpc(): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -343,11 +368,8 @@ async def test_sklearn_v2_grpc(): kserve_client.delete(service_name, KSERVE_TEST_NAMESPACE) -# In ODH, this test generates the following response: -# Code 500 - 'ColumnTransformer' object has no attribute '_name_to_fitted_passthrough' @pytest.mark.predictor @pytest.mark.asyncio(scope="session") -@pytest.mark.skip("Not testable in ODH at the moment") async def test_sklearn_v2_mixed(rest_v2_client): service_name = "isvc-sklearn-v2-mixed" predictor = V1beta1PredictorSpec( @@ -369,7 +391,11 @@ async def test_sklearn_v2_mixed(rest_v2_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) diff --git a/test/e2e/predictor/test_tensorflow.py b/test/e2e/predictor/test_tensorflow.py index 0135e9e241b..125f741082c 100644 --- a/test/e2e/predictor/test_tensorflow.py +++ b/test/e2e/predictor/test_tensorflow.py @@ -48,7 +48,11 @@ async def test_tensorflow_kserve(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -90,7 +94,11 @@ async def test_tensorflow_runtime_kserve(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) diff --git a/test/e2e/predictor/test_triton.py b/test/e2e/predictor/test_triton.py index fff24bb9f0f..2d93f6e5e33 100644 --- a/test/e2e/predictor/test_triton.py +++ b/test/e2e/predictor/test_triton.py @@ -50,7 +50,11 @@ async def test_triton(rest_v2_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -64,15 +68,12 @@ async def test_triton(rest_v2_client): service_name, namespace=KSERVE_TEST_NAMESPACE, timeout_seconds=800 ) except RuntimeError as e: - print( - kserve_client.api_instance.get_namespaced_custom_object( - "serving.knative.dev", - "v1", - KSERVE_TEST_NAMESPACE, - "services", - service_name + "-predictor", - ) + services = kserve_client.core_api.list_namespaced_service( + KSERVE_TEST_NAMESPACE, + label_selector="serving.kserve.io/inferenceservice={}".format(service_name), ) + for svc in services.items: + print(svc) deployments = kserve_client.app_api.list_namespaced_deployment( KSERVE_TEST_NAMESPACE, label_selector="serving.kserve.io/" @@ -91,12 +92,10 @@ async def test_triton(rest_v2_client): kserve_client.delete(service_name, KSERVE_TEST_NAMESPACE) -# Not testable in ODH until the following issue is solved: -# https://github.com/opendatahub-io/odh-model-controller/issues/59 @pytest.mark.transformer @pytest.mark.path_based_routing @pytest.mark.asyncio(scope="session") -@pytest.mark.skip(reason="Not testable in ODH at the moment") +@pytest.mark.skip(reason="Reactivate after https://github.com/opendatahub-io/odh-model-controller/pull/601 is merged") async def test_triton_runtime_with_transformer(rest_v1_client): service_name = "isvc-triton-runtime" predictor = V1beta1PredictorSpec( @@ -114,12 +113,20 @@ async def test_triton_runtime_with_transformer(rest_v1_client): ), ) + # Check if IMAGE_TRANSFORMER_IMG_TAG environment variable is set + transformer_image = os.environ.get("IMAGE_TRANSFORMER_IMG_TAG") + if not transformer_image: + error_msg = "ERROR: IMAGE_TRANSFORMER_IMG_TAG environment variable is not set. This is required for the transformer container image." + print(error_msg) + raise ValueError(error_msg) + transformer = V1beta1TransformerSpec( min_replicas=1, containers=[ V1Container( - image=os.environ.get("IMAGE_TRANSFORMER_IMG_TAG"), + image=transformer_image, name="kserve-container", + ports=[V1ContainerPort(container_port=8080, name="http1", protocol="TCP")], resources=V1ResourceRequirements( requests={"cpu": "10m", "memory": "128Mi"}, limits={"cpu": "100m", "memory": "512Mi"}, @@ -132,7 +139,11 @@ async def test_triton_runtime_with_transformer(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor, transformer=transformer), ) @@ -145,16 +156,14 @@ async def test_triton_runtime_with_transformer(rest_v1_client): kserve_client.wait_isvc_ready( service_name, namespace=KSERVE_TEST_NAMESPACE, timeout_seconds=800 ) + except RuntimeError as e: - print( - kserve_client.api_instance.get_namespaced_custom_object( - "serving.knative.dev", - "v1", - KSERVE_TEST_NAMESPACE, - "services", - service_name + "-predictor", - ) + services = kserve_client.core_api.list_namespaced_service( + KSERVE_TEST_NAMESPACE, + label_selector="serving.kserve.io/inferenceservice={}".format(service_name), ) + for svc in services.items: + print(svc) deployments = kserve_client.app_api.list_namespaced_deployment( KSERVE_TEST_NAMESPACE, label_selector="serving.kserve.io/" @@ -163,6 +172,7 @@ async def test_triton_runtime_with_transformer(rest_v1_client): for deployment in deployments.items: print(deployment) raise e + res = await predict_isvc( rest_v1_client, service_name, "./data/image.json", model_name="cifar10" ) diff --git a/test/e2e/predictor/test_xgboost.py b/test/e2e/predictor/test_xgboost.py index a231d2e897f..548cbe87ee1 100644 --- a/test/e2e/predictor/test_xgboost.py +++ b/test/e2e/predictor/test_xgboost.py @@ -53,7 +53,11 @@ async def test_xgboost_kserve(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -98,7 +102,11 @@ async def test_xgboost_v2_mlserver(rest_v2_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -149,7 +157,11 @@ async def test_xgboost_single_model_file(rest_v2_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -193,7 +205,11 @@ async def test_xgboost_runtime_kserve(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -241,7 +257,11 @@ async def test_xgboost_v2_runtime_mlserver(rest_v2_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -286,7 +306,11 @@ async def test_xgboost_v2(rest_v2_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -335,7 +359,11 @@ async def test_xgboost_v2_grpc(): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) diff --git a/test/e2e/storagespec/test_s3_storagespec.py b/test/e2e/storagespec/test_s3_storagespec.py index 9619dc59038..5ee094d4918 100644 --- a/test/e2e/storagespec/test_s3_storagespec.py +++ b/test/e2e/storagespec/test_s3_storagespec.py @@ -53,7 +53,11 @@ async def test_sklearn_s3_storagespec_kserve(rest_v1_client): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) diff --git a/test/e2e/storagespec/test_s3_tls_storagespec.py b/test/e2e/storagespec/test_s3_tls_storagespec.py index 3cf522c61fd..d00276e947d 100644 --- a/test/e2e/storagespec/test_s3_tls_storagespec.py +++ b/test/e2e/storagespec/test_s3_tls_storagespec.py @@ -72,6 +72,7 @@ @pytest.mark.kserve_on_openshift @pytest.mark.asyncio(scope="session") +@pytest.mark.skip("Will be fixed as part of RHOAIENG-39707") async def test_s3_tls_global_custom_cert_storagespec_kserve(): kserve_client = KServeClient( config_file=os.environ.get("KUBECONFIG", "~/.kube/config") @@ -113,7 +114,11 @@ async def test_s3_tls_global_custom_cert_storagespec_kserve(): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -149,6 +154,7 @@ async def test_s3_tls_global_custom_cert_storagespec_kserve(): @pytest.mark.kserve_on_openshift @pytest.mark.asyncio(scope="session") +@pytest.mark.skip("Will be fixed as part of RHOAIENG-39707") async def test_s3_tls_custom_cert_storagespec_kserve(): kserve_client = KServeClient( config_file=os.environ.get("KUBECONFIG", "~/.kube/config") @@ -190,7 +196,11 @@ async def test_s3_tls_custom_cert_storagespec_kserve(): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) @@ -226,6 +236,7 @@ async def test_s3_tls_custom_cert_storagespec_kserve(): @pytest.mark.kserve_on_openshift @pytest.mark.asyncio(scope="session") +@pytest.mark.skip("Will be fixed as part of RHOAIENG-39707") async def test_s3_tls_serving_cert_storagespec_kserve(): kserve_client = KServeClient( config_file=os.environ.get("KUBECONFIG", "~/.kube/config") @@ -251,7 +262,11 @@ async def test_s3_tls_serving_cert_storagespec_kserve(): api_version=constants.KSERVE_V1BETA1, kind=constants.KSERVE_KIND_INFERENCESERVICE, metadata=client.V1ObjectMeta( - name=service_name, namespace=KSERVE_TEST_NAMESPACE + name=service_name, + namespace=KSERVE_TEST_NAMESPACE, + labels={ + constants.KSERVE_LABEL_NETWORKING_VISIBILITY: constants.KSERVE_LABEL_NETWORKING_VISIBILITY_EXPOSED, + }, ), spec=V1beta1InferenceServiceSpec(predictor=predictor), ) diff --git a/test/scripts/openshift-ci/deploy.serverless.sh b/test/scripts/openshift-ci/deploy.serverless.sh index dd9ce01e863..7c9fc2288f0 100755 --- a/test/scripts/openshift-ci/deploy.serverless.sh +++ b/test/scripts/openshift-ci/deploy.serverless.sh @@ -172,8 +172,13 @@ if [ -z "$secret_name" ]; then if $RUNNING_LOCAL; then export secret_name=router-certs-default else - # In OpenShift 4.12, the default secret name is changed to default-ingress-cert - export secret_name=default-ingress-cert + # Check which secret exists in the openshift-ingress namespace + if oc get secret default-ingress-cert -n openshift-ingress >/dev/null 2>&1; then + export secret_name=default-ingress-cert + else + echo "Secret 'default-ingress-cert' not found in openshift-ingress namespace, defaulting to 'router-certs-default'" + export secret_name=router-certs-default + fi fi fi oc get secret -n openshift-ingress diff --git a/test/scripts/openshift-ci/run-e2e-tests.sh b/test/scripts/openshift-ci/run-e2e-tests.sh index a83b9059f8d..cef8ea99eb1 100755 --- a/test/scripts/openshift-ci/run-e2e-tests.sh +++ b/test/scripts/openshift-ci/run-e2e-tests.sh @@ -37,6 +37,7 @@ if $RUNNING_LOCAL; then export GITHUB_SHA=master if [ "$BUILD_KSERVE_IMAGES" = "true" ]; then + echo "asd" pushd $PROJECT_ROOT >/dev/null ./test/scripts/openshift-ci/build-kserve-images.sh | tee 2>&1 ./test/scripts/openshift-ci/build-kserve-images.log popd @@ -60,6 +61,11 @@ fi PARALLELISM="${2:-1}" # Use certify go module to get the CA certs +if [ ! -f "/tmp/ca.crt" ]; then + echo "❌ Error: CA certificate file '/tmp/ca.crt' not found. Please ensure the setup script ran successfully." + exit 1 +fi + export REQUESTS_CA_BUNDLE="/tmp/ca.crt" echo "REQUESTS_CA_BUNDLE=$(cat ${REQUESTS_CA_BUNDLE})" diff --git a/test/scripts/openshift-ci/setup-e2e-tests.sh b/test/scripts/openshift-ci/setup-e2e-tests.sh index 6b6e927e64b..a702bdccf48 100755 --- a/test/scripts/openshift-ci/setup-e2e-tests.sh +++ b/test/scripts/openshift-ci/setup-e2e-tests.sh @@ -25,6 +25,20 @@ set -o pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "$SCRIPT_DIR/common.sh" +# Define deployment types that skip serverless installation +MARKERS_SKIP_SERVERLESS=("raw" "graph" "predictor" "path_based_routing") + +# Helper function to check if deployment type should skip serverless +skip_serverless() { + local deployment_type="$1" + for type in "${MARKERS_SKIP_SERVERLESS[@]}"; do + if [[ "$deployment_type" =~ $type ]]; then + return 0 + fi + done + return 1 +} + : "${SKLEARN_IMAGE:=kserve/sklearnserver:latest}" : "${KSERVE_CONTROLLER_IMAGE:=quay.io/opendatahub/kserve-controller:latest}" : "${KSERVE_AGENT_IMAGE:=quay.io/opendatahub/kserve-agent:latest}" @@ -93,8 +107,8 @@ if [[ "$1" =~ raw ]]; then fi fi -# Install KServe stack - skip serverless for raw and graph deployments -if [[ ! "$1" =~ raw && ! "$1" =~ graph ]]; then +# Install KServe stack - skip serverless for raw, graph and predictor deployments +if ! skip_serverless "$1"; then echo "Installing OSSM" $MY_PATH/deploy.ossm.sh echo "Installing Serverless" @@ -112,15 +126,15 @@ kustomize build $PROJECT_ROOT/config/overlays/test | sed "s|kserve/agent:latest|${KSERVE_AGENT_IMAGE}|" | sed "s|kserve/router:latest|${KSERVE_ROUTER_IMAGE}|" | sed "s|kserve/kserve-controller:latest|${KSERVE_CONTROLLER_IMAGE}|" | - oc apply --server-side=true -f - + oc apply --server-side=true --force-conflicts -f - # Install DSC/DSCI for test. (sometimes there is timing issue when it is under the same kustomization so it is separated) oc apply -f config/overlays/test/dsci.yaml oc apply -f config/overlays/test/dsc.yaml # Patch the inferenceservice-config ConfigMap, when running RawDeployment tests -if [[ "$1" =~ raw || "$1" =~ graph ]]; then - echo "Patching RAW/Graph deployment, markers: $1" +if skip_serverless "$1"; then + echo "Patching RAW deployment, markers: $1" export OPENSHIFT_INGRESS_DOMAIN=$(oc get ingresses.config cluster -o jsonpath='{.spec.domain}') oc patch configmap inferenceservice-config -n kserve --patch-file <(cat config/overlays/test/configmap/inferenceservice-openshift-ci-raw.yaml | envsubst) oc delete pod -n kserve -l control-plane=kserve-controller-manager @@ -135,7 +149,7 @@ fi echo "waiting kserve-controller get ready..." oc wait --for=condition=ready pod -l control-plane=kserve-controller-manager -n kserve --timeout=300s -if [[ ! "$1" =~ raw && ! "$1" =~ graph ]]; then +if ! skip_serverless "$1"; then echo "Installing authorino and kserve gateways" # authorino curl -sL https://raw.githubusercontent.com/Kuadrant/authorino-operator/main/utils/install.sh | sed "s|kubectl|oc|" | @@ -147,6 +161,7 @@ echo "Installing ODH Model Controller" kustomize build $PROJECT_ROOT/test/scripts/openshift-ci | sed "s|quay.io/opendatahub/odh-model-controller:fast|${ODH_MODEL_CONTROLLER_IMAGE}|" | oc apply -n kserve -f - + echo "Waiting for the odh-model-controller pod to become ready... (300s)" oc wait --for=condition=ready pod -l app=odh-model-controller -n kserve --timeout=300s # Configure certs for the python requests by getting the CA cert from the kserve controller pod @@ -209,7 +224,7 @@ metadata: name: kserve-ci-e2e-test EOF -if [[ ! "$1" =~ raw && ! "$1" =~ graph ]]; then +if ! skip_serverless "$1"; then cat <