HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/helm.cpython-310.pyc
o

�N�g��@s>dZddlZddlZddlZddlmZddlmZe�e	�Z
ddd�Zdhd	d
�Zdidd�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
Cs�|durg}|dur
g}nt�|�}|duri}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_cmd3s<	

���rc
Cszt|||d�}d�|�}ztd|d�}|�d|i�W|Sty<}zdd||d�}t�|�WYd	}~|Sd	}~ww)
�N

    :param commands:
    :param flags:
    :param kvflags:
    :return:
    �rrr� zcmd.run_all)rr����)�retcode�stdout�stderrrN)r�joinZ__salt__�updater�log�error)rrrrZ
cmd_string�result�errrrr�	_exec_cmdcs
���r)cCs6t|||d�}|�dd�dkrd}|S|�dd�}|S)rrr rrTr"r�r)�get�rrrZ
cmd_resultr'rrr�_exec_true_returnxs�r-cCs>t|||d�}|�dd�dkr|�dd�}|S|�dd�}|S)rrr rrr!rr"r*r,rrr�_exec_string_return�s�r.cCs�|duri}d|��vsd|��vs|�ddi�t|||d�}|�dd�dkrI|�d�dks6|�d�dkrAt�|�d	d
��}|S|�d	d
�}|S|�dd
�}|S)rN�outputz--outputrrr rrr!rr")�keysr$r)r+rZdeserializer,rrr�_exec_dict_return�s��r1cC�td|g||d�S)a�
    Generate auto-completions script for Helm for the specified shell (bash or zsh).
    Return the shell auto-completion content.

    shell
        (string) One of ['bash', 'zsh'].

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.completion bash

    �
completionr�r.)�shellrrrrrr3�s
�r3cCr2)a�
    Creates a chart directory along with the common files and directories used in a chart.
    Return True if succeed, else the error message.

    name
        (string) The chart name to create.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.create NAME

    �creater�r-)�namerrrrrr6��r6cC�tdd|g||d�S)a�
    Build out the charts/ directory from the Chart.lock file.
    Return True if succeed, else the error message.

    chart
        (string) The chart name to build dependency.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.dependency_build CHART

    �
dependency�buildrr7��chartrrrrr�dependency_build���r?cCr:)a�
    List all of the dependencies declared in a chart.
    Return chart dependencies if succeed, else the error message.

    chart
        (string) The chart name to list dependency.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.dependency_list CHART

    r;rrr4r=rrr�dependency_list�r@rAcCr:)a�
    Update the on-disk dependencies to mirror Chart.yaml.
    Return True if succeed, else the error message.

    chart
        (string) The chart name to update dependency.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.dependency_update CHART

    r;r$rr7r=rrr�dependency_updater@rBcC�tdg||d�S)a�
    Prints out all the environment information in use by Helm.
    Return Helm environments variables if succeed, else the error message.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.env

    �envrr4�rrrrrrD/�rDcCr:)a4
    Prints a human readable collection of information about the notes, hooks, supplied values, and generated manifest file of the given release.
    Return release information if succeed, else the error message.

    release
        (string) Release name to get information from.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.get_all RELEASE

    r+�allrr4��releaserrrrr�get_allDr@rJcCr:)a

    Prints a human readable collection of information about the hooks of the given release.
    Return release hooks information if succeed, else the error message.

    release
        (string) Release name to get hooks information from.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.get_hooks RELEASE

    r+Zhooksrr4rHrrr�	get_hooks^r@rKcCr:)a
    Prints a human readable collection of information about the manifest of the given release.
    Return release manifest information if succeed, else the error message.

    release
        (string) Release name to get manifest information from.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.get_manifest RELEASE

    r+Zmanifestrr4rHrrr�get_manifestxr@rLcCr:)a

    Prints a human readable collection of information about the notes of the given release.
    Return release notes information if succeed, else the error message.

    release
        (string) Release name to get notes information from.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.get_notes RELEASE

    r+Znotesrr4rHrrr�	get_notes�r@rMcCr:)aq
    Prints a human readable collection of information about the values of the given release.
    Return release values information if succeed, else the error message.

    release
        (string) Release name to get values information from.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.get_values RELEASE

        # In YAML format
        salt '*' helm.get_values RELEASE kvflags="{'output': 'yaml'}"

    r+�valuesr�r1rHrrr�
get_values���rPcCr2)a�
    Provides help for any command in the application.
    Return the full help if succeed, else the error message.

    command
        (string) Command to get help. ex: 'get'

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.help COMMAND

    rrr4)rrrrrrr�r9rcCr2)a.
    Prints historical revisions for a given release.
    Return release historic if succeed, else the error message.

    release
        (string) Release name to get history from.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.history RELEASE

        # In YAML format
        salt '*' helm.history RELEASE kvflags="{'output': 'yaml'}"

    �historyrrOrHrrrrR�s
�rRcC�|r|r|�d|i�nd|i}|r |r|�d|i�nd|i}|r0|r,|�d|i�nd|i}|r@|r<|�d|i�nd|i}td||g||d�S)a�
    Installs a chart archive.
    Return True if succeed, else the error message.

    release
        (string) Release name to get values information from.

    chart
        (string) Chart name to install.

    values
        (string) Absolute path to the values.yaml file.

    version
        (string) The exact chart version to install. If this is not specified, the latest version is installed.

    namespace
        (string) The namespace scope for this request.

    set
        (string or list) Set a values on the command line.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.install RELEASE CHART

        # With values file.
        salt '*' helm.install RELEASE CHART values='/path/to/values.yaml'

    rN�version�	namespace�set�installr�r$r-�rIr>rNrTrUrVrrrrrrW�s&0�rWcCsr|r|r|�d|i�nd|i}|r |r|�d|i�nd|i}|r0|r,|�d|i�nd|i}td|g||d�S)a�
    Takes a path to a chart and runs a series of tests to verify that the chart is well-formed.
    Return True if succeed, else the error message.

    path
        (string) The path to the chart to lint.

    values
        (string) Absolute path to the values.yaml file.

    namespace
        (string) The namespace scope for this request.

    set
        (string or list) Set a values on the command line.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.lint PATH

    rNrUrV�lintrrX)�pathrNrUrVrrrrrrZGsrZcCs0|r|r|�d|i�nd|i}tdg||d�S)aK
    Lists all of the releases. By default, it lists only releases that are deployed or failed.
    Return the list of release if succeed, else the error message.

    namespace
        (string) The namespace scope for this request.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.list

        # In YAML format
        salt '*' helm.list kvflags="{'output': 'yaml'}"

    rUrr�r$r1�rUrrrrrrws
rcCr2)a�
    Packages a chart into a versioned chart archive file. If a path is given, this will look at that path for a chart
    (which must contain a Chart.yaml file) and then package that directory.
    Return True if succeed, else the error message.

    chart
        (string) Chart name to package. Can be an absolute path.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.package CHART

        # With destination path.
        salt '*' helm.package CHART kvflags="{'destination': '/path/to/the/package'}"

    �packagerr7r=rrrr^�sr^cCr:)a�
    Install a Helm plugin from a url to a VCS repo or a local path.
    Return True if succeed, else the error message.

    path
        (string) Path to the local plugin. Can be an url.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.plugin_install PATH

    �pluginrWrr7�r[rrrrr�plugin_install�r@racCstddg||d�S)ax
    List installed Helm plugins.
    Return the plugin list if succeed, else the error message.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.plugin_list

    r_rrr4rErrr�plugin_list�s
�rbcCr:)a�
    Uninstall a Helm plugin.
    Return True if succeed, else the error message.

    plugin
        (string) The plugin to uninstall.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.plugin_uninstall PLUGIN

    r_�	uninstallrr7�r_rrrrr�plugin_uninstall�r@recCr:)a�
    Update a Helm plugin.
    Return True if succeed, else the error message.

    plugin
        (string) The plugin to update.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.plugin_update PLUGIN

    r_r$rr7rdrrr�
plugin_update�r@rfcCr2)ae
    Retrieve a package from a package repository, and download it locally.
    Return True if succeed, else the error message.

    pkg
        (string) The package to pull. Can be url or repo/chartname.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.pull PKG

        # With destination path to write the chart.
        salt '*' helm.pull PKG kvflags="{'destination': '/path/to/the/chart'}"

    �pullrr7)ZpkgrrrrrrgsrgcCs6|r|r|�d|i�nd|i}tdd||g||d�S)aD
    Add a chart repository.
    Return True if succeed, else the error message.

    name
        (string) The local name of the repository to install. Have to be unique.

    url
        (string) The url to the repository.

    namespace
        (string) The namespace scope for this request.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.repo_add NAME URL

    rU�repo�addrrX)r8�urlrUrrrrr�repo_add3s�rkcC�4|r|r|�d|i�nd|i}tdd|g||d�S)a"
    Read the current directory and generate an index file based on the charts found.
    Return True if succeed, else the error message.

    directory
        (string) The path to the index.

    namespace
        (string) The namespace scope for this request.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.index DIRECTORY

    rUrh�indexrrX)�	directoryrUrrrrr�
repo_indexX��rocC�2|r|r|�d|i�nd|i}tddg||d�S)a
    List a chart repository.
    Return the repository list if succeed, else the error message.

    namespace
        (string) The namespace scope for this request.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.repo_list

        # In YAML format
        salt '*' helm.repo_list kvflags="{'output': 'yaml'}"

    rUrhrrr\r]rrr�	repo_listzs
rrcCrl)a�
    Remove a chart repository.
    Return True if succeed, else the error message.

    name
        (string) The local name of the repository to remove.

    namespace
        (string) The namespace scope for this request.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.repo_remove NAME

    rUrh�removerrX)r8rUrrrrr�repo_remove�rprtcCrq)a�
    Update all charts repository.
    Return True if succeed, else the error message.

    namespace
        (string) The namespace scope for this request.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.repo_update

    rUrhr$rrXr]rrr�repo_update�s
ruFcCs�|durg}nt�|�}|durg}nt�|�}|r(|r$|�d|i�nd|i}t|||d�}t|t�s6g}gggggd�}|D]m}t|t�rSd|��vrSd|��vsWtd��d}	t	|�D](\}
}|�
d�|�
d�kr�|�
d�|�
d�kr�|d	�|�|�|
�d
}	nq]|	s�t
|�
d�|�
d�|||d�}t|t�r�|r�|d�|�q@|d�|�q@|D]}|r�|�|�
d��q�|�
d�|vr�|d	�|�q�|D]}
t|
|d
�}t|t�r�|r�|d�|
�q�|d�|
�q�|S)aA
    Manage charts repository.
    Return the summery of all actions.

    present
        (list) List of repository to be present. It's a list of dict: [{'name': 'local_name', 'url': 'repository_url'}]

    absent
        (list) List of local name repository to be absent.

    prune
        (boolean - default: False) If True, all repository already present but not in the present list would be removed.

    namespace
        (string) The namespace scope for this request.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.repo_manage present="[{'name': 'LOCAL_NAME', 'url': 'REPO_URL'}]" absent="['LOCAL_NAME']"

    NrUr])�present�added�absent�removed�failedr8rjz\Parameter present have to be formatted like [{'name': '<myRepoName>', 'url': '<myRepoUrl>'}]FrvTrwrz)rUryrx)r	r
r$rrrr�dictr0r�	enumerater+�append�poprk�boolrt)rvrxZprunerUrrZ
repos_presentr'rhZalready_presentrmZrepo_presentZrepo_add_statusr8Z
remove_statusrrr�repo_manage�sr 


����
����r�cCs4|r|r|�d|i�nd|i}td||g||d�S)a�
    Rolls back a release to a previous revision.
    To see release revision number, execute the history module.
    Return True if succeed, else the error message.

    release
        (string) The name of the release to managed.

    revision
        (string) The revision number to roll back to.

    namespace
        (string) The namespace scope for this request.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.rollback RELEASE REVISION

        # In dry-run mode.
        salt '*' helm.rollback RELEASE REVISION flags=['dry-run']

    rU�rollbackrrX)rI�revisionrUrrrrrr�<s�r�cCr:)aG
    Search the Helm Hub or an instance of Monocular for Helm charts.
    Return the research result if succeed, else the error message.

    keyword
        (string) The keyword to search in the hub.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.search_hub KEYWORD

        # In YAML format
        salt '*' helm.search_hub KEYWORD kvflags="{'output': 'yaml'}"

    rZhubrrO��keywordrrrrr�
search_huberQr�cCr:)a�
    Search reads through all of the repositories configured on the system, and looks for matches. Search of these
    repositories uses the metadata stored on the system.
    Return the research result if succeed, else the error message.

    keyword
        (string) The keyword to search in the repo.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.search_hub KEYWORD

        # In YAML format
        salt '*' helm.search_hub KEYWORD kvflags="{'output': 'yaml'}"

    rrhrrOr�rrr�search_repo�s�r�cCr:)a�
    Inspects a chart (directory, file, or URL) and displays all its content (values.yaml, Charts.yaml, README).
    Return chart information if succeed, else the error message.

    chart
        (string) The chart to inspect.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.show_all CHART

    �showrGrr4r=rrr�show_all�r@r�cCr:)a�
    Inspects a chart (directory, file, or URL) and displays the contents of the Charts.yaml file.
    Return chart information if succeed, else the error message.

    chart
        (string) The chart to inspect.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.show_chart CHART

    r�r>rr4r=rrr�
show_chart�r@r�cCr:)a�
    Inspects a chart (directory, file, or URL) and displays the contents of the README file.
    Return chart information if succeed, else the error message.

    chart
        (string) The chart to inspect.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.show_readme CHART

    r�Zreadmerr4r=rrr�show_readme�r@r�cCr:)a�
    Inspects a chart (directory, file, or URL) and displays the contents of the values.yaml file.
    Return chart information if succeed, else the error message.

    chart
        (string) The chart to inspect.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.show_values CHART

    r�rNrr4r=rrr�show_values�r@r�cC�2|r|r|�d|i�nd|i}td|g||d�S)aX
    Show the status of the release.
    Return the release status if succeed, else the error message.

    release
        (string) The release to status.

    namespace
        (string) The namespace scope for this request.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.status RELEASE

        # In YAML format
        salt '*' helm.status RELEASE kvflags="{'output': 'yaml'}"

    rU�statusrr\�rIrUrrrrrr�s
r�cCsf|r|r|�d|i�nd|i}|r |r|�d|i�nd|i}|r)|�d|i�td||g||d�S)aS
    Render chart templates locally and display the output.
    Return the chart renderer if succeed, else the error message.

    name
        (string) The template name.

    chart
        (string) The chart to template.

    values
        (string) Absolute path to the values.yaml file.

    output_dir
        (string) Absolute path to the output directory.

    set
        (string or list) Set a values on the command line.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.template NAME CHART

        # With values file.
        salt '*' helm.template NAME CHART values='/path/to/values.yaml' output_dir='path/to/output/dir'

    rNrVz
output-dir�templater)r$r.)r8r>rNZ
output_dirrVrrrrrr�+s&�r�cCr2)a�
    Runs the tests for a release.
    Return the test result if succeed, else the error message.

    release
        (string) The release name to test.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.test RELEASE

    �testrr4rHrrrr�br9r�cCr�)aP
    Uninstall the release name.
    Return True if succeed, else the error message.

    release
        (string) The name of the release to managed.

    namespace
        (string) The namespace scope for this request.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.uninstall RELEASE

        # In dry-run mode.
        salt '*' helm.uninstall RELEASE flags=['dry-run']

    rUrcrrXr�rrrrczs
�rccCrS)a

    Upgrades a release to a new version of a chart.
    Return True if succeed, else the error message.

    release
        (string) The name of the release to managed.

    chart
        (string) The chart to managed.

    values
        (string) Absolute path to the values.yaml file.

    version
        (string) The exact chart version to install. If this is not specified, the latest version is installed.

    namespace
        (string) The namespace scope for this request.

    set
        (string or list) Set a values on the command line.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.upgrade RELEASE CHART

        # In dry-run mode.
        salt '*' helm.upgrade RELEASE CHART flags=['dry-run']

        # With values file.
        salt '*' helm.upgrade RELEASE CHART values='/path/to/values.yaml'

    rNrTrUrV�upgraderrXrYrrrr��s&3�r�cCr2)a�
    Verify that the given chart has a valid provenance file.
    Return True if succeed, else the error message.

    path
        (string) The path to the chart file.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.verify PATH

    �verifyrr7r`rrrr��r9r�cCrC)av
    Show the version for Helm.
    Return version information if succeed, else the error message.

    flags
        (list) Flags in argument of the command without values. ex: ['help', '--help']

    kvflags
        (dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}

    CLI Example:

    .. code-block:: bash

        salt '*' helm.version

    rTrr4rErrrrTrFrT)rNNN)NNN)NN)NNNNNN)NNNNN)NNFNNN);�__doc__r	�loggingrZsalt.exceptionsrZsalt.serializersr�	getLogger�__name__r%Z__func_alias__rr)r-r.r1r3r6r?rArBrDrJrKrLrMrPrrRrWrZrr^rarbrerfrgrkrorrrtrur�r�r�r�r�r�r�r�r�r�r�rcr�r�rTrrrr�<module>s�"
�

0















 
�
I
0
 






%
"
 
"
�
c
)





$
�
7
(
�
L