@@ -163,7 +163,7 @@ def _setup_llm_configuration(console, aks_agent_manager: AKSAgentManagerLLMConfi
163163
164164
165165def _setup_helm_deployment (console , aks_agent_manager : AKSAgentManager ):
166- """Setup and deploy helm chart with service account and managed identity configuration."""
166+ """Setup and deploy helm chart with service account configuration."""
167167 console .print ("\n 🚀 Phase 2: Helm Deployment" , style = f"bold { HELP_COLOR } " )
168168
169169 # Check current helm deployment status
@@ -179,22 +179,6 @@ def _setup_helm_deployment(console, aks_agent_manager: AKSAgentManager):
179179 f"\n 👤 Current service account in namespace '{ aks_agent_manager .namespace } ': { service_account_name } " ,
180180 style = "cyan" )
181181
182- # Prompt for managed identity client ID update
183- existing_client_id = aks_agent_manager .managed_identity_client_id
184- if existing_client_id :
185- console .print (
186- f"\n 🔑 Current workload identity (managed identity) client ID: { existing_client_id } " , style = "cyan" )
187- change_client_id = console .input (
188- f"[{ HELP_COLOR } ]Do you want to change the workload identity client ID? (y/N): [/]" ).strip ().lower ()
189-
190- if change_client_id in ['y' , 'yes' ]:
191- managed_identity_client_id = _prompt_managed_identity_configuration (console )
192- aks_agent_manager .managed_identity_client_id = managed_identity_client_id
193- else :
194- console .print ("\n 🔑 No workload identity (managed identity) currently configured." , style = "cyan" )
195- managed_identity_client_id = _prompt_managed_identity_configuration (console )
196- if managed_identity_client_id :
197- aks_agent_manager .managed_identity_client_id = managed_identity_client_id
198182 elif helm_status == "not_found" :
199183 console .print (
200184 f"Helm chart not deployed (status: { helm_status } ). Setting up deployment..." ,
@@ -203,11 +187,15 @@ def _setup_helm_deployment(console, aks_agent_manager: AKSAgentManager):
203187 # Prompt for service account configuration
204188 console .print ("\n 👤 Service Account Configuration" , style = f"bold { HELP_COLOR } " )
205189 console .print (
206- f"The AKS agent requires a service account with appropriate permissions in the '{ aks_agent_manager .namespace } ' namespace." ,
190+ f"The AKS agent requires a service account with appropriate Azure and Kubernetes permissions in the '{ aks_agent_manager .namespace } ' namespace." ,
207191 style = INFO_COLOR )
208192 console .print (
209193 "Please ensure you have created the necessary Role and RoleBinding in your namespace for this service account." ,
210194 style = WARNING_COLOR )
195+ console .print (
196+ "If the AKS agent requires access to Azure resources, the service account should be annotated with "
197+ "'azure.workload.identity/client-id: <managed-identity-client-id>'." ,
198+ style = INFO_COLOR )
211199
212200 # Prompt user for service account name (required)
213201 while True :
@@ -220,10 +208,6 @@ def _setup_helm_deployment(console, aks_agent_manager: AKSAgentManager):
220208 console .print (
221209 "Service account name cannot be empty. Please enter a valid service account name." , style = WARNING_COLOR )
222210
223- # Prompt for managed identity client ID
224- managed_identity_client_id = _prompt_managed_identity_configuration (console )
225- if managed_identity_client_id :
226- aks_agent_manager .managed_identity_client_id = managed_identity_client_id
227211 else :
228212 # Handle non-standard helm status (failed, pending-install, pending-upgrade, etc.)
229213 cmd_flags = aks_agent_manager .command_flags ()
@@ -269,37 +253,6 @@ def _setup_helm_deployment(console, aks_agent_manager: AKSAgentManager):
269253 f"You can check the status later using 'az aks agent --status { cmd_flags } '" , style = "cyan" )
270254
271255
272- def _prompt_managed_identity_configuration (console ):
273- """Prompt user for managed identity client ID configuration."""
274- console .print ("\n 🔑 Managed Identity Configuration" , style = f"bold { HELP_COLOR } " )
275-
276- console .print (
277- "To access Azure resources using workload identity, you need to provide the managed identity client ID." ,
278- style = INFO_COLOR )
279-
280- configure = console .input (
281- f"[{ HELP_COLOR } ]Do you want to configure managed identity client ID? (Y/n): [/]" ).strip ().lower ()
282-
283- if configure in ['n' , 'no' ]:
284- console .print (
285- "⚠️ Skipping managed identity configuration. Workload identity will not be configured." ,
286- style = WARNING_COLOR
287- )
288- return ""
289-
290- while True :
291- client_id = console .input (
292- f"[{ HELP_COLOR } ]Please enter your managed identity client ID: [/]" ).strip ()
293-
294- if client_id :
295- console .print (f"✅ Using managed identity client ID: { client_id } " , style = SUCCESS_COLOR )
296- return client_id
297- console .print (
298- "❌ Client ID cannot be empty. Please provide a valid client ID or answer 'N' to skip." ,
299- style = ERROR_COLOR
300- )
301-
302-
303256def _setup_and_create_llm_config (console , aks_agent_manager : AKSAgentManagerLLMConfigBase ):
304257 """Setup and create LLM configuration with user input.
305258
0 commit comments