@@ -40,8 +40,7 @@ def enabled_llama_stack_operator(dsc_resource: DataScienceCluster) -> Generator[
4040@pytest .fixture (scope = "class" )
4141def llama_stack_server_config (
4242 request : FixtureRequest ,
43- admin_client : DynamicClient ,
44- model_namespace : Namespace ,
43+ unprivileged_model_namespace : Namespace ,
4544) -> Dict [str , Any ]:
4645 fms_orchestrator_url = "http://localhost"
4746 inference_model = os .getenv ("LLS_CORE_INFERENCE_MODEL" , "" )
@@ -100,15 +99,15 @@ def llama_stack_server_config(
10099
101100@pytest .fixture (scope = "class" )
102101def llama_stack_distribution (
103- admin_client : DynamicClient ,
104- model_namespace : Namespace ,
102+ unprivileged_client : DynamicClient ,
103+ unprivileged_model_namespace : Namespace ,
105104 enabled_llama_stack_operator : DataScienceCluster ,
106105 llama_stack_server_config : Dict [str , Any ],
107106) -> Generator [LlamaStackDistribution , None , None ]:
108107 with create_llama_stack_distribution (
109- client = admin_client ,
110- name = "llama -stack-distribution" ,
111- namespace = model_namespace .name ,
108+ client = unprivileged_client ,
109+ name = "test-lama -stack-distribution" ,
110+ namespace = unprivileged_model_namespace .name ,
112111 replicas = 1 ,
113112 server = llama_stack_server_config ,
114113 ) as lls_dist :
@@ -118,11 +117,11 @@ def llama_stack_distribution(
118117
119118@pytest .fixture (scope = "class" )
120119def llama_stack_distribution_deployment (
121- admin_client : DynamicClient ,
120+ unprivileged_client : DynamicClient ,
122121 llama_stack_distribution : LlamaStackDistribution ,
123122) -> Generator [Deployment , Any , Any ]:
124123 deployment = Deployment (
125- client = admin_client ,
124+ client = unprivileged_client ,
126125 namespace = llama_stack_distribution .namespace ,
127126 name = llama_stack_distribution .name ,
128127 )
@@ -133,15 +132,13 @@ def llama_stack_distribution_deployment(
133132
134133@pytest .fixture (scope = "class" )
135134def llama_stack_client (
136- admin_client : DynamicClient ,
137135 llama_stack_distribution_deployment : Deployment ,
138136) -> Generator [LlamaStackClient , Any , Any ]:
139137 """
140138 Returns a ready to use LlamaStackClient, enabling port forwarding
141139 from the llama-stack-server service:8321 to localhost:8321
142140
143141 Args:
144- admin_client (DynamicClient): Kubernetes dynamic client for cluster operations
145142 llama_stack_distribution_deployment (Deployment): LlamaStack distribution deployment resource
146143
147144 Yields:
0 commit comments