Current File : //usr/lib/python3/dist-packages/sos/collector/clusters/__pycache__/kubernetes.cpython-312.pyc
�

-�_g@��2�ddlmZddlmZGd�de�Zy)�)�quote)�Clusterc�8�eZdZdZdZdZdgZddiZdZddgZ	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.
    zCommunity Kubernetes)zkubernetes-masterzkubernetes.all�on�kubectl)�label�z-Filter node list to those with matching label)�roler
z,Filter node list to those with matching rolec�:�|xjdz
c_|jd�r1|xjdt|jd���d�z
c_|j|j�}|ddk(r�g}|jd�j	d�D�cgc]}|s�|��	}}|d	j�d
dD]E}|j	�}|s|j
|d��*|d|vs�2|j
|d��G|Std��cc}w)
Nz
 get nodesr	z -l � �statusrr�,�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_nodeszkubernetes.get_nodes"s�����L� ���?�?�7�#��H�H�$�u�T�_�_�W�%=�>�?�q�A�A�H��#�#�D�H�H�-���x�=�A���E� $���� 7� =� =�c� B�H�1�a�Q�H�E�H��h�-�2�2�4�Q�R�8�
.���|�|�~����L�L��a��)��A�w�%�'����T�!�W�-�

.��L��G�H�H��Is�D�'DN)�__name__�
__module__�__qualname__�__doc__�cluster_name�packages�sos_plugins�sos_plugin_optionsr�option_listr"��r!rrs@���*�L�%�H��.�K�*�D�1��
�C�	G�D��K�
Ir-rN)�shlexr�sos.collector.clustersrrr,r-r!�<module>r0s���*�#I��#Ir-