File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/helm.cpython-310.pyc
Back
o ;j� � @ s> d Z ddlZddlZddlZddlmZ ddlmZ e�e �Z ddd�Zdhd d �Zdidd�Z did d�Zdidd�Zdidd�Zdjdd�Zdjdd�Zdjdd�Zdjdd�Zdjdd�Zdjdd�Zdjdd �Zdjd!d"�Zdjd#d$�Zdjd%d&�Zdjd'd(�Zdjd)d*�Zdjd+d,�Z dkd-d.�Zdld/d0�Zdid1d2�Z djd3d4�Z!djd5d6�Z"djd7d8�Z#djd9d:�Z$djd;d<�Z%djd=d>�Z&did?d@�Z'didAdB�Z(didCdD�Z)didEdF�Z*didGdH�Z+ dmdJdK�Z,didLdM�Z-djdNdO�Z.djdPdQ�Z/djdRdS�Z0djdTdU�Z1djdVdW�Z2djdXdY�Z3didZd[�Z4 dld\d]�Z5djd^d_�Z6did`da�Z7 dkdbdc�Z8djddde�Z9djdfdg�Z:dS )na� Interface with Helm :depends: pyhelm_ Python package .. _pyhelm: https://pypi.org/project/pyhelm/ .. note:: This module use the helm-cli. The helm-cli binary have to be present in your Salt-Minion path. Helm-CLI vs Salt-Modules ------------------------ This module is a wrapper of the helm binary. All helm v3.0 command are implemented. To install a chart with the helm-cli: .. code-block:: bash helm install grafana stable/grafana --wait --values /path/to/values.yaml To install a chart with the Salt-Module: .. code-block:: bash salt '*' helm.install grafana stable/grafana values='/path/to/values.yaml' flags="['wait']" Detailed Function Documentation ------------------------------- � N)�CommandExecutionError)�json�help�list)�help_�list_�helmc C s� |du rg }|du r g }nt �|�}|du ri }nt �|�}| f}|D ]}||f7 }q#|D ]}t�d|�s9d| }||f7 }q-|�� D ])\}}t�d|�sQd| }|dkrft|t�rf|D ]} ||| f7 }q\qC|||f7 }qC|S )za :param binary: :param commands: :param flags: :param kvflags: :return: Nz^--.*z--z--set)�copy�deepcopy�re�search�items� isinstancer ) �binary�commands�flags�kvflags�cmd�command�arg�key�valZset_val� r �E/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/helm.py�_prepare_cmd3 s<