HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/helm.cpython-310.pyc
o

�N�gl)�@sdddlZddlmZe�e�Z							ddd�Zd
dd�Z						ddd	�Zd
d
d�Z	dS)�N)�CommandExecutionErrorFc
Cs4|iddd�}dtvrd|d<d|d<|Sd	tvr#d|d<d
|d<|St�dd�r3d|d<d
|d<|SzGtd||||||d�}	|	drSd|d<|	|d<d|d<W|S|	ds[|	drx|rmtd	|||d�}
|	�d|
i�d|d<|	|d<W|SW|Sty�}zd|d<d|�d�|d<WYd}~|Sd}~ww)a&
    Make sure the repository is updated.

    name
        (string) Not used.

    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.

    repo_update
        (boolean - default: False) If True, the Helm repository is updated after a repository add or 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}

    Example:

    .. code-block:: yaml

        helm_repository_is_managed:
          helm.repo_managed:
            - present:
              - name: local_name_1
                url: repository_url
            - absent:
              - local_name_2

    TzHelm repo is managed.��name�changes�result�commentzhelm.repo_manageFrz8'helm.repo_manage' modules not available on this minion.r�helm.repo_update�8'helm.repo_update' modules not available on this minion.�testNz"Helm repo would have been managed.)�present�absent�prune�	namespace�flags�kvflagsZfailedz*Failed to add or remove some repositories.rZaddedZremoved�rrr�repo_updatez#Repositories were added or removed.z!Failed to add some repositories: �.)�__salt__�__opts__�get�updater)rrrr
rrrr�retrZresult_repo_update�err�r�D/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/helm.py�repo_manageds`3�%�"���	
��
����rc
Cs�|iddd�}dtvrd|d<d|d<|St�d	d�r%d
|d<d|d<|Sz"td|||d�}t|t�r6|sEd|d<||d
<d|d<W|SW|Styf}zd|d<d|�d�|d<WYd
}~|Sd
}~ww)a�
    Make sure the repository is updated.
    To execute after a repository changes.

    name
        (string) Not used.

    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}

    Example:

    .. code-block:: yaml

        helm_repository_is_updated:
          helm.repo_updated

    TzHelm repo is updated.rrFrr	rr
Nz"Helm repo would have been updated.rrz!Failed to sync some repositories.z$Failed to update some repositories: r)rrr�
isinstance�boolr)rrrrrrrrrr�repo_updatedks<����
�	���rc

Cs�|idd|�d�d�}dtvrd|d<d|d	<|Sd
tvr'd|d<d|d	<|Sdtvr5d|d<d
|d	<|St�dd�rEd|d<d|d	<|Std||d�}	t|	t�r�td||||||||d�}
t|
t�r�|
r�td||d�}t|t�r|�d�||d<|Sd|d<||d	<|Sd|d<|
|d	<|Std
||||||||d�}t|t�r�|r�td||d�}t|t�r�|�d�||d<|Sd|d<||d	<|Sd|d<||d	<|S)a
    Make sure the release name is present.

    name
        (string) The release name to install.

    chart
        (string) The chart 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}

    Example:

    .. code-block:: yaml

        helm_release_is_present:
          helm.release_present:
            - name: release_name
            - chart: repo/chart

        # In dry-run mode.
        helm_release_is_present_dry-run:
          helm.release_present:
            - name: release_name
            - chart: repo/chart
            - flags:
              - dry-run

        # With values.yaml file.
        helm_release_is_present_values:
          helm.release_present:
            - name: release_name
            - chart: repo/chart
            - kvflags:
                values: /path/to/values.yaml

    T�
Helm release z is presentr�helm.statusFr�3'helm.status' modules not available on this minion.rzhelm.installz4'helm.install' modules not available on this minion.zhelm.upgradez4'helm.upgrade' modules not available on this minion.r
Nz2Helm release would have been installed or updated.��releaser)r$�chart�values�versionr�setrrZmanifestr)rrrr�dictr�pop)
rr%r&r'rr(rrrZrelease_old_statusZrelease_upgradeZrelease_cur_statusZrelease_installrrr�release_present�s�@
�>�;�8�5�
�
�

!����
�

��r+cCs�|idd|�d�d�}dtvrd|d<d|d	<|Sd
tvr'd|d<d|d	<|St�dd�r7d
|d<d|d	<|Std
||d�}t|t�retd||||d�}t|t�r]|r]d|i|d<|Sd|d<||d	<|S)a�
    Make sure the release name is absent.

    name
        (string) The release name to uninstall.

    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}

    Example:

    .. code-block:: yaml

        helm_release_is_absent:
          helm.release_absent:
            - name: release_name

        # In dry-run mode.
        helm_release_is_absent_dry-run:
          helm.release_absent:
            - name: release_name
            - flags:
              - dry-run

    Tr z is absent.rzhelm.uninstallFrz6'helm.uninstall' modules not available on this minion.rr!r"r
Nz)Helm release would have been uninstalled.r#)r$rrrrr)rrrrr)r)rrrrrZrelease_statusZrelease_uninstallrrr�release_absent+s8!
���
�
��r,)NNFFNNN)NNN)NNNNNN)
�loggingZsalt.exceptionsr�	getLogger�__name__�logrrr+r,rrrr�<module>s*

�
c:
�