Skip to main content

helm-upgrade

PyPI version pre-commit.ci status CI Tests codecov

Do you manage a Helm Chart that has dependencies on other Helm Charts? Are you fed up of manually updating these dependencies? Then this is the tool for you! helm-upgrade is a Python command line interface (CLI) that automatically updates the dependencies of local Helm Charts.

This tool was inspired by bump-helm-deps-action.

Table of Contents


:rocket: Installation

It's recommended to use Python version 3.8 with this tool.

:snake: pip

pip install helm-upgrade

:wrench: Manual

First of all, clone this repository and change into it.

git clone https://github.com/sgibson91/helm-upgrade.git
cd helm-upgrade

Use Python to install requirements and the package. Python 3.8 is recommended.

python -m pip install .

Test the installation by calling the help page.

helm-upgrade --help

:recycle: Usage

usage: helm-upgrade [-h] [--dry-run] chart_path dependencies

Update the dependencies of a local Helm Chart in a project repository.

positional arguments:
  chart_path    Path to the file containing the dependencies of the local Helm Chart to
                be updated.
  dependencies  A dictionary of Helm Chart dependencies and their host repo URLs. E.g.
                '{"nginx-ingress":
                "https://raw.githubusercontent.com/helm/charts/master/stable/nginx-
                ingress/Chart.yaml"}'

optional arguments:
  -h, --help    show this help message and exit
  --dry-run     Perform a dry run of the update. Don't write the changes to a file.

helm-upgrade will then:

  1. read the current versions of your dependencies from the file you specify,
  2. find the latest versions of your desired dependencies from the URLs provided (in JSON schema) to the dependencies argument,
  3. compare whether these versions are equal,
  4. if the versions are not equal (and the --dry-run flag has not been set), your helm chart dependencies will be overwritten with the new chart versions.

:wheel_of_dharma: Remote Helm Charts

helm-upgrade currently recognises chart versions from three types of hosts.

  1. A Chart.yaml file from another GitHub repository. These URLs end with "/Chart.yaml".

    For example, https://raw.githubusercontent.com/helm/charts/master/stable/nginx-ingress/Chart.yaml

  2. A repository of chart versions hosted on GitHub pages. These URLs contain "/gh-pages/".

    For example, https://raw.githubusercontent.com/jupyterhub/helm-chart/gh-pages/index.yaml

  3. Versions listed on a GitHub Releases page. These URLs end with "/releases/latest" and uses BeautifulSoup to search the html.

    For example, https://github.com/jetstack/cert-manager/releases/latest

:white_check_mark: Running Tests

To run the test suite, you must first following the manual installation instructions. Once completed, the test suite can be run as follows:

python -m pytest -vvv

To see code coverage of the test suite, run the following:

python -m coverage run -m pytest -vvv
coverage report

An interactive HTML version of the report can be accessed by running the following:

coverage html

And then opening the htmlcov/index.html file in a browser window.

:sparkles: Contributing

:tada: Thank you for wanting to contribute! :tada: Make sure to read our Code of Conduct and Contributing Guidelines to get you started.

Metadata

Release files for helm-upgrade 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for helm-upgrade 0.1.1
File Size Uploaded Provenance Actions
helm-upgrade-0.1.1.tar.gz 6.0 kB Without provenance Details for helm-upgrade-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for helm-upgrade 0.1.1
File Interpreter ABI Platform Actions
helm_upgrade-0.1.1-py3-none-any.whl Python 3 none any Details for helm_upgrade-0.1.1-py3-none-any.whl

Total release size: 12.7 kB

Release files / helm-upgrade-0.1.1.tar.gz

Download URL helm-upgrade-0.1.1.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2ea8b6a90398d843cec9fc2bbc06295380ba11bd6efc9f6808c4050474b6110a
BLAKE2b-256 checksum
How to use checksums
b5c649091d2b35b081237e10402eeee56c64e35e6b51387469028c3394600fb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.2 Linux/5.11.0-1028-azure

Release files / helm_upgrade-0.1.1-py3-none-any.whl

Download URL helm_upgrade-0.1.1-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9dbc23c106033137123c2725efc03c9143a08fe5791c2f95790bcce7fc507a2
BLAKE2b-256 checksum
How to use checksums
071e07e25a40b360cc6d8a7f1b3ccde7eceb21970ba6c6c54143511c0a47cb83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.2 Linux/5.11.0-1028-azure

Security for helm-upgrade 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page