kustomize.star¶
Set image tags and names in kustomization files, the usual way to roll out a release with Kustomize.
Edits are line-based, so comments and layout stay as they were.
| Function | What it does |
|---|---|
files |
Lists the repo's kustomization files. |
set_image |
Sets newTag, newName or digest for an image in every kustomization's images list. |
files¶
Lists the repo's kustomization files.
Arguments
| Name | Description |
|---|---|
repo |
The repo passed to change(repo). |
Returns: The sorted paths of every kustomization.yaml, kustomization.yml and Kustomization file.
Example
set_image¶
Sets newTag, newName or digest for an image in every kustomization's images list.
Only kustomizations that already list the image change; an entry is
found by its name. A missing newTag or newName key is added to the
entry.
Arguments
| Name | Description |
|---|---|
repo |
The repo passed to change(repo). |
name |
The image name as the manifests use it, such as ghcr.io/acme/api. |
new_tag |
The tag to set, or None to leave it. |
new_name |
The replacement image name to set, or None to leave it. |
digest |
The digest to set, such as sha256:..., or None to leave it. |
Returns: The list of paths that changed.
Example
Used in: kustomize-image