�
i��d � �, � d dl mZmZ G d� dee� Zy)� )�Plugin�UbuntuPluginc �0 � e Zd ZdZdZdZdZdZdZd� Z d� Z
y) �Microk8sa The Microk8s plugin collects the current status of the microk8s
snap on a Ubuntu machine.
It will collect logs from journald related to the snap.microk8s
units as well as run microk8s commands to retrieve the configuration,
status, version and loaded plugins.
zThe lightweight Kubernetes�microk8s)� container)r c �~ � | j d�� g d�}| j |D �cg c] }d|� ��� c}� y c c}w )Nzsnap.microk8s.*)�units)zaddons repo list�configzctr plugins lszctr plugins ls -d�status�versionz microk8s )�add_journal�add_cmd_output)�self�microk8s_subcmds�subcmds �=/usr/lib/python3/dist-packages/sos/report/plugins/microk8s.py�setupzMicrok8s.setup sK � ����0��1�
��
���/?�
�%+�i��x� �
� ��
s �:c �. � d}| j d|d� y )Nz((certificate-authority-data:|token:)\s.*r z\1 "**********")�do_cmd_output_sub)r �rsubs r �postproczMicrok8s.postproc0 s � �:�����z�4�1C�D� N)�__name__�
__module__�__qualname__�__doc__�
short_desc�plugin_name�profiles�packages�microk8s_cmdr r � r r r r s- � �� .�J��K��H��H��L�� Er r N)�sos.report.pluginsr r r r# r r �<module>r% s �� 4�#E�v�|� #Er |