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.
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 (mikefarah/yq#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
You can install helm_tag_updater
using:
Docker
docker pull fayvori/helm_tag_updater
pip
pip install helm_tag_updater
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 |
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
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
Attempt to run in production mode with not matching tag
Running with custom tag matching regular expression and yaml path
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.
- Fork this repository
- 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
- Ensure that any documentation is updated with the changes that are required by your fix.
- Ensure that any samples are updated if the base image has been changed.
- 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.
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.