
    -_g@                     2    d dl mZ d dlmZ  G d de      Zy)    )quote)Clusterc                   8    e Zd ZdZdZdZd gZddiZdZddgZ	d	 Z
y
)
kubernetesz
    The kuberentes cluster profile is intended to be used on kubernetes
    clusters built from the upstream/source kubernetes (k8s) project. It is
    not intended for use with other projects or platforms that are built ontop
    of kubernetes.
    zCommunity Kubernetes)zkubernetes-masterzkubernetes.allonkubectl)label z-Filter node list to those with matching label)roler
   z,Filter node list to those with matching rolec                 :   | xj                   dz  c_         | j                  d      r1| xj                   dt        | j                  d             dz  c_         | j                  | j                         }|d   dk(  rg }| j                  d      j	                  d      D cg c]  }|s|	 }}|d	   j                         d
d  D ]E  }|j	                         }|s|j                  |d          *|d   |v s2|j                  |d          G |S t        d      c c}w )Nz
 get nodesr	   z -l  statusr   r   ,output      z-Node enumeration did not return usable output)cmd
get_optionr   exec_primary_cmdsplit
splitlinesappend	Exception)selfresnodesxrolesnodelnnodes          C/usr/lib/python3/dist-packages/sos/collector/clusters/kubernetes.py	get_nodeszkubernetes.get_nodes"   s   L ??7#HH$uT__W%=>?qAAH##DHH-x=AE $ 7 = =c BH1aQHEHh-224QR8 .||~LLa)Aw%'T!W-. LGHH Is   D'DN)__name__
__module____qualname____doc__cluster_namepackagessos_pluginssos_plugin_optionsr   option_listr"        r!   r   r      s@     *L%H.K*D1
C 	GDK
Ir-   r   N)shlexr   sos.collector.clustersr   r   r,   r-   r!   <module>r0      s     *#I #Ir-   