
    	                     r    S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  S\R                  4S	 jrg
)z7Cluster-access utilities for Attached cluster commands.    )absolute_import)division)unicode_literals)	kube_util)	constants)errorskube_clientc                 H   U R                  SR                  S[        R                  5      5      n[        R                  U;  a3  [        R
                  " SR                  [        R                  5      5      eU R                  [        R                  SS5      u  p#Ub  [        R
                  " SU-   5      eU R                  [        R                  SR                  U5      S	5      u  pCUb  [        R
                  " S
U-   5      eUS:w  a  [        R
                  " SU-   5      eg)a?  Verifies the install agent is deployed and running on the target cluster.

Accesses the cluster and checks if the install agent is running to ensure
subsequent operations can succeed. Raises MissingAttachedInstallAgent if the
agent is not running or it can't be determined.

Args:
  kube_client: Client to the cluster.
z{}={}zkubernetes.io/metadata.namez"{}" namespace is missing.podsz.items[*].metadata.nameNzUnable to get pods: zpods/{}z.status.phasez!Unable to get install agent pod: RunningzInvalid install agent status: )NamespacesWithLabelSelectorformatr    ATTACHED_INSTALL_AGENT_NAMESPACEr   MissingAttachedInstallAgentGetResourceField)r	   nspod_nameerrstatuss        Alib/googlecloudsdk/command_lib/container/attached/cluster_util.pyverify_install_agent_deployedr      s    ..nn
'

4
4" //r9

,
,$++66	
 
 ..00-(
 	_

,
,-Cc-I
JJ,,00x +&
 	_

,
,+c1  y

,
,(61      N)__doc__
__future__r   r   r   *googlecloudsdk.command_lib.container.fleetr   2googlecloudsdk.command_lib.container.gkemulticloudr   r   KubernetesClientr    r   r   <module>r      s.    > &  ' @ H E)y/I/I )r   