Skip to main content

⎈ helm_tag_updater

A python CLI application which updates a helm `values.yaml` image tag

Introducing

helm_tag_updater is a python cli tool which can update values.yaml fields inside a CI/CD pipeline. Also it's an easy to use tool for implementing GitOps principles.

Why helm_tag_updater / Alternatives

helm_tag_updater is a simple to use cli which is also support regular expression tag matching and prod mode.

Tool Easy to use Additional setup required Additional checks
helm_tag_updater ✅ No additional setup required Regular expression matching, production mode
yq ✅ No additional setup required, but yq breaks yaml structure (https://github.com/mikefarah/yq/issues/1248) ❎
kustomize ✅ Require additional kustomization.yaml file ❎
sed ❎ Supported by all Linux systems ❎
  • You can setup tag checking and regular expression matching using linux tools, but helm_tag_updater support it out of the box

Installation

You can install helm_tag_updater using:

Docker

docker pull fayvori/helm_tag_updater

pip

pip install helm_tag_updater

Usage

helm_image_updater tag

flag default purpose
--help, -h None Prints help message and exit
--tag, -t None Tag that should be applied on values.yaml file. NOTE: If you set -p or --prod flag tag should match regular expression -e --expression flag
--filepath,   -f None Path to the values.yaml file
--prod, -p False Enables prod mode (e.g. enables regular expression matching)
--expression, -e v[0-9].[0-9].[0-9] Expression that tag should match if prod mode is enabled
--yaml_path, -y image.tag A field that should be changed, nested fields separated with

Quick start

For quick start you can run helm_tag_updater locally in a container and download examples/manifest.yaml file.

docker run -it --rm --name helm_tag_updater fayvori/helm_tag_updater:1.0 /bin/sh
wget https://raw.githubusercontent.com/fayvori/helm_tag_updater/main/examples/manifest.yaml

Update tag in development mode

helm_tag_updater -t 3c5aec6 -f $(pwd)/manifest.yaml

cat manifest.yaml | head -n 15

dev update

Production mode regular expression matching (for default value see Usage)

helm_tag_updater -t v0.0.1 -f $(pwd)/manifest.yaml -p

cat manifest.yaml | head -n 15

prod mode

Attempt to run in production mode with not matching tag

prod mode attempt

Running with custom tag matching regular expression and yaml path

custom tag matching and yaml path

Contributing

If you want to submit a pull request to fix a bug or enhance an existing feature, please first open an issue and link to that issue when you submit your pull request.

If you have any questions about a possible submission, feel free to open an issue too.

Pull request process

  1. Fork this repository
  2. Create a branch in your fork to implement the changes. We recommend using the issue number as part of your branch name, e.g. 1234-fixes
  3. Ensure that any documentation is updated with the changes that are required by your fix.
  4. Ensure that any samples are updated if the base image has been changed.
  5. Submit the pull request. Do not leave the pull request blank. Explain exactly what your changes are meant to do and provide simple steps on how to validate your changes. Ensure that you reference the issue you created as well. The pull request will be review before it is merged.

Made by

License

MIT License

Copyright (c) 2023 Ignat Belousov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Metadata

Release files for helm-tag-updater 0.0.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-tag-updater 0.0.1
File Size Uploaded Provenance Actions
helm_tag_updater-0.0.1.tar.gz 4.3 kB Without provenance Details for helm_tag_updater-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for helm-tag-updater 0.0.1
File Interpreter ABI Platform Actions
helm_tag_updater-0.0.1-py3-none-any.whl Python 3 none any Details for helm_tag_updater-0.0.1-py3-none-any.whl

Total release size: 9.9 kB

Release files / helm_tag_updater-0.0.1.tar.gz

Download URL helm_tag_updater-0.0.1.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c0e634f3730c7f06bfbc2d5b3db6846688b23274c2a8120a40c80d4b622234e2
BLAKE2b-256 checksum
How to use checksums
9b6207e6fe8c9cfa0bc0b31d95ba958e99e561116c0fc503f03ff5e70ae2bd97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.0 Linux/5.15.0-1041-azure

Release files / helm_tag_updater-0.0.1-py3-none-any.whl

Download URL helm_tag_updater-0.0.1-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2de39388beefda1a76e9bb7c65de87bb1c4aca9a00cf51a2e7a98badeba250b9
BLAKE2b-256 checksum
How to use checksums
91c4ab76ba77dbd46f3472e630f96ee1f7bb8c271e06671a35c41c0e3cc6c34d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.0 Linux/5.15.0-1041-azure

Security for helm-tag-updater 0.0.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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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