文件操作 - microshift.cpython-310.pyc
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/microshift.cpython-310.pyc
编辑文件内容
o i��d� � @ s2 d dl mZmZmZ d dlZG dd� dee�ZdS )� )�Plugin�RedHatPlugin� PluginOptNc @ s� e Zd ZdZd ZdZdZdZedddfZefZ dZ ed e ed d�edd edd�edd edd�gZ dd� Zdd� Zdd� Zdd� Zdd� ZdS )� Microshifta: This is the plugin for MicroShift 4.X. Even though it shares some of the OpenShift components, its IoT/Edge target makes the product nimble and light, thus requiring different a approach when operating it. When enabled, this plugin will collect cluster information (such as systemd service logs, configuration, versions, etc.)and also inspect API resources in certain namespaces. The namespaces to scan are kube.* and openshift.*. Other namespaces may be collected by making use of the ``only-namespaces`` or ``add-namespaces`` options. � microshifti� )r zmicroshift-selinuxzmicroshift-networkingzmicroshift-greenbootzgreenboot-healthcheckzgreenboot-task-runnerzredboot-task-runnerz2/var/lib/microshift/resources/kubeadmin/kubeconfig� kubeconfigz+Path to a locally available kubeconfig file)�default�val_type�desc�only-namespaces� z2colon-delimited list of namespaces to collect from�add-namespaceszHcolon-delimited list of namespaces to add to the default collection listc C s^ | � d�rdd� | � d��d�D �S ddg}| � d�r-| � d��d�D ] }|�d| � q#|S ) z�Combine a set of regexes for collection with any namespaces passed to sos via the -k openshift.add-namespaces option. Note that this does allow for end users to specify namespace regexes of their own. r c S s g | ]}|�qS � r ��.0�nr r �?/usr/lib/python3/dist-packages/sos/report/plugins/microshift.py� <listcomp>4 s z7Microshift._setup_namespace_regexes.<locals>.<listcomp>�:z^openshift\-.+$z ^kube\-.+$r z^%s$)� get_option�split�append)�self�collect_regexes�nspr r r �_setup_namespace_regexes. s � z#Microshift._setup_namespace_regexesc s0 �fdd�� �� � �_tt� fdd�|D ���S )a Reduce the namespace listing returned to just the ones we want to collect from. By default, as requested by OCP support personnel, this must include all 'openshift' prefixed namespaces :param nsps list: Namespace names from oc output c s"