2121 KServeDeploymentType ,
2222 LLMdInferenceSimConfig ,
2323 RuntimeTemplates ,
24+ Timeout ,
2425 VLLMGPUConfig ,
2526)
2627from utilities .inference_utils import create_isvc
@@ -197,7 +198,7 @@ def llm_d_inference_sim_isvc(
197198 deployment_mode = KServeDeploymentType .RAW_DEPLOYMENT ,
198199 model_format = LLMdInferenceSimConfig .name ,
199200 runtime = llm_d_inference_sim_serving_runtime .name ,
200- wait_for_predictor_pods = True ,
201+ wait_for_predictor_pods = False ,
201202 min_replicas = 1 ,
202203 max_replicas = 1 ,
203204 resources = {
@@ -206,6 +207,12 @@ def llm_d_inference_sim_isvc(
206207 },
207208 teardown = teardown_resources ,
208209 ) as isvc :
210+ deployment = Deployment (
211+ client = admin_client ,
212+ name = f"{ isvc .name } -predictor" ,
213+ namespace = model_namespace .name ,
214+ )
215+ deployment .wait_for_replicas (timeout = Timeout .TIMEOUT_2MIN )
209216 yield isvc
210217
211218
@@ -326,3 +333,33 @@ def get_vllm_chat_config(namespace: str) -> dict[str, Any]:
326333 "port" : VLLMGPUConfig .port ,
327334 }
328335 }
336+
337+
338+ @pytest .fixture (scope = "class" )
339+ def patched_dsc_garak_kfp (admin_client ) -> Generator [DataScienceCluster ]:
340+ """Configure the DataScienceCluster for Garak and KFP (Kubeflow Pipelines) testing.
341+
342+ This fixture patches the DataScienceCluster to enable:
343+ - KServe in Headed mode (using Service port instead of Pod port)
344+ - AI Pipelines component in Managed state
345+ - MLflow operator in Managed state
346+
347+ Waits for the DSC to be ready before yielding.
348+ """
349+
350+ dsc = get_data_science_cluster (client = admin_client )
351+ with ResourceEditor (
352+ patches = {
353+ dsc : {
354+ "spec" : {
355+ "components" : {
356+ "kserve" : {"rawDeploymentServiceConfig" : "Headed" },
357+ "aipipelines" : {"managementState" : "Managed" },
358+ "mlflowoperator" : {"managementState" : "Managed" },
359+ }
360+ }
361+ }
362+ }
363+ ):
364+ wait_for_dsc_status_ready (dsc_resource = dsc )
365+ yield dsc
0 commit comments