Interface with Helm
pyhelm Python package
Note
This module use the helm-cli. The helm-cli binary have to be present in your Salt-Minion path.
This module is a wrapper of the helm binary. All helm v3.0 command are implemented.
To install a chart with the helm-cli:
helm install grafana stable/grafana --wait --values /path/to/values.yaml
To install a chart with the Salt-Module:
salt '*' helm.install grafana stable/grafana values='/path/to/values.yaml' flags="['wait']"
Generate auto-completions script for Helm for the specified shell (bash or zsh). Return the shell auto-completion content.
(string) One of ['bash', 'zsh'].
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.completion bash
Creates a chart directory along with the common files and directories used in a chart. Return True if succeed, else the error message.
(string) The chart name to create.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.create NAME
Build out the charts/ directory from the Chart.lock file. Return True if succeed, else the error message.
(string) The chart name to build dependency.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.dependency_build CHART
List all of the dependencies declared in a chart. Return chart dependencies if succeed, else the error message.
(string) The chart name to list dependency.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.dependency_list CHART
Update the on-disk dependencies to mirror Chart.yaml. Return True if succeed, else the error message.
(string) The chart name to update dependency.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.dependency_update CHART
Prints out all the environment information in use by Helm. Return Helm environments variables if succeed, else the error message.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.env
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.
(string) Release name to get information from.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.get_all RELEASE
Prints a human readable collection of information about the hooks of the given release. Return release hooks information if succeed, else the error message.
(string) Release name to get hooks information from.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.get_hooks RELEASE
Prints a human readable collection of information about the manifest of the given release. Return release manifest information if succeed, else the error message.
(string) Release name to get manifest information from.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.get_manifest RELEASE
Prints a human readable collection of information about the notes of the given release. Return release notes information if succeed, else the error message.
(string) Release name to get notes information from.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.get_notes RELEASE
Prints a human readable collection of information about the values of the given release. Return release values information if succeed, else the error message.
(string) Release name to get values information from.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.get_values RELEASE
# In YAML format
salt '*' helm.get_values RELEASE kvflags="{'output': 'yaml'}"
Provides help for any command in the application. Return the full help if succeed, else the error message.
(string) Command to get help. ex: 'get'
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.help COMMAND
Prints historical revisions for a given release. Return release historic if succeed, else the error message.
(string) Release name to get history from.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.history RELEASE
# In YAML format
salt '*' helm.history RELEASE kvflags="{'output': 'yaml'}"
Installs a chart archive. Return True if succeed, else the error message.
(string) Release name to get values information from.
(string) Chart name to install.
(string) Absolute path to the values.yaml file.
(string) The exact chart version to install. If this is not specified, the latest version is installed.
(string) The namespace scope for this request.
(string or list) Set a values on the command line.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.install RELEASE CHART
# With values file.
salt '*' helm.install RELEASE CHART values='/path/to/values.yaml'
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.
(string) The path to the chart to lint.
(string) Absolute path to the values.yaml file.
(string) The namespace scope for this request.
(string or list) Set a values on the command line.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.lint PATH
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.
(string) The namespace scope for this request.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.list
# In YAML format
salt '*' helm.list kvflags="{'output': 'yaml'}"
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.
(string) Chart name to package. Can be an absolute path.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.package CHART
# With destination path.
salt '*' helm.package CHART kvflags="{'destination': '/path/to/the/package'}"
Install a Helm plugin from a url to a VCS repo or a local path. Return True if succeed, else the error message.
(string) Path to the local plugin. Can be an url.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.plugin_install PATH
List installed Helm plugins. Return the plugin list if succeed, else the error message.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.plugin_list
Uninstall a Helm plugin. Return True if succeed, else the error message.
(string) The plugin to uninstall.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.plugin_uninstall PLUGIN
Update a Helm plugin. Return True if succeed, else the error message.
(string) The plugin to update.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.plugin_update PLUGIN
Retrieve a package from a package repository, and download it locally. Return True if succeed, else the error message.
(string) The package to pull. Can be url or repo/chartname.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.pull PKG
# With destination path to write the chart.
salt '*' helm.pull PKG kvflags="{'destination': '/path/to/the/chart'}"
Add a chart repository. Return True if succeed, else the error message.
(string) The local name of the repository to install. Have to be unique.
(string) The url to the repository.
(string) The namespace scope for this request.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.repo_add NAME URL
Read the current directory and generate an index file based on the charts found. Return True if succeed, else the error message.
(string) The path to the index.
(string) The namespace scope for this request.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.index DIRECTORY
List a chart repository. Return the repository list if succeed, else the error message.
(string) The namespace scope for this request.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.repo_list
# In YAML format
salt '*' helm.repo_list kvflags="{'output': 'yaml'}"
Manage charts repository. Return the summery of all actions.
(list) List of repository to be present. It's a list of dict: [{'name': 'local_name', 'url': 'repository_url'}]
(list) List of local name repository to be absent.
(boolean - default: False) If True, all repository already present but not in the present list would be removed.
(string) The namespace scope for this request.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.repo_manage present="[{'name': 'LOCAL_NAME', 'url': 'REPO_URL'}]" absent="['LOCAL_NAME']"
Remove a chart repository. Return True if succeed, else the error message.
(string) The local name of the repository to remove.
(string) The namespace scope for this request.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.repo_remove NAME
Update all charts repository. Return True if succeed, else the error message.
(string) The namespace scope for this request.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.repo_update
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.
(string) The name of the release to managed.
(string) The revision number to roll back to.
(string) The namespace scope for this request.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.rollback RELEASE REVISION
# In dry-run mode.
salt '*' helm.rollback RELEASE REVISION flags=['dry-run']
Search the Helm Hub or an instance of Monocular for Helm charts. Return the research result if succeed, else the error message.
(string) The keyword to search in the hub.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.search_hub KEYWORD
# In YAML format
salt '*' helm.search_hub KEYWORD kvflags="{'output': 'yaml'}"
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.
(string) The keyword to search in the repo.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.search_hub KEYWORD
# In YAML format
salt '*' helm.search_hub KEYWORD kvflags="{'output': 'yaml'}"
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.
(string) The chart to inspect.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.show_all CHART
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.
(string) The chart to inspect.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.show_chart CHART
Inspects a chart (directory, file, or URL) and displays the contents of the README file. Return chart information if succeed, else the error message.
(string) The chart to inspect.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.show_readme CHART
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.
(string) The chart to inspect.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.show_values CHART
Show the status of the release. Return the release status if succeed, else the error message.
(string) The release to status.
(string) The namespace scope for this request.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.status RELEASE
# In YAML format
salt '*' helm.status RELEASE kvflags="{'output': 'yaml'}"
Render chart templates locally and display the output. Return the chart renderer if succeed, else the error message.
(string) The template name.
(string) The chart to template.
(string) Absolute path to the values.yaml file.
(string) Absolute path to the output directory.
(string or list) Set a values on the command line.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.template NAME CHART
# With values file.
salt '*' helm.template NAME CHART values='/path/to/values.yaml' output_dir='path/to/output/dir'
Runs the tests for a release. Return the test result if succeed, else the error message.
(string) The release name to test.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.test RELEASE
Uninstall the release name. Return True if succeed, else the error message.
(string) The name of the release to managed.
(string) The namespace scope for this request.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.uninstall RELEASE
# In dry-run mode.
salt '*' helm.uninstall RELEASE flags=['dry-run']
Upgrades a release to a new version of a chart. Return True if succeed, else the error message.
(string) The name of the release to managed.
(string) The chart to managed.
(string) Absolute path to the values.yaml file.
(string) The exact chart version to install. If this is not specified, the latest version is installed.
(string) The namespace scope for this request.
(string or list) Set a values on the command line.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
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'
Verify that the given chart has a valid provenance file. Return True if succeed, else the error message.
(string) The path to the chart file.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.verify PATH
Show the version for Helm. Return version information if succeed, else the error message.
(list) Flags in argument of the command without values. ex: ['help', '--help']
(dict) Flags in argument of the command with values. ex: {'v': 2, '--v': 4}
CLI Example:
salt '*' helm.version