HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/sos/collector/clusters/__pycache__/kubernetes.cpython-38.pyc
U

i��dT�@s,ddlmZddlmZGdd�de�ZdS)�)�quote)�Clusterc@s:eZdZdZdZdZdgZddiZdZddgZ	d	d
�Z
dS)�
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.allZonZkubectl)�label�z-Filter node list to those with matching label)�rolerz,Filter node list to those with matching rolecCs�|jd7_|�d�r4|jdt|�d��7_|�|j�}|ddkr�g}dd�|�d��d	�D�}|d
��dd�D]:}|��}|s�|�|d�q~|d|kr~|�|d�q~|Std
��dS)Nz
 get nodesrz -l %s ZstatusrcSsg|]}|r|�qS�r)�.0�xrr�C/usr/lib/python3/dist-packages/sos/collector/clusters/kubernetes.py�
<listcomp>)sz(kubernetes.get_nodes.<locals>.<listcomp>r�,�output��z-Node enumeration did not return usable output)�cmdZ
get_optionrZexec_primary_cmd�split�
splitlines�append�	Exception)�self�resZnodesZrolesZnodelnZnoderrr�	get_nodes"s
zkubernetes.get_nodesN)�__name__�
__module__�__qualname__�__doc__Zcluster_nameZpackagesZsos_pluginsZsos_plugin_optionsrZoption_listrrrrrrs�rN)ZpipesrZsos.collector.clustersrrrrrr�<module>s