This script allows you to bump the tag versions of all the Docker images defined in a kustomization.yaml file.
It does this by:
- Parsing
kustomization.yaml - Finding out the tags and images of each field in
images: - Asking docker-hub-rss which tags were released when
- Skip image tags without any digits (probably means unversioned) (See
KBUMP_NODIGITSfor configuration) - Skip image tags with
['unstable', 'latest', 'testing', 'arm64', 'arm32']in the name (SeeKBUMP_FORBIDDEN_WORDSfor configuration) - Trying to magically find a good one (compare tag slugs, give less importance to older tags)
- Writing the new candidate to
kustomization.yaml
docker run -t -v $(pwd)/kustomization.yaml:/kustomization.yaml chauffer/kustomize-bump
Environment variables:
KBUMP_NODIGITS: Set to0to not skip images without numbers.KBUMP_FORBIDDEN_WORDS: Set to a comma separated string of forbidden words.KBUMP_FILEPATH: Path tokustomization.yaml. Defaults to/kustomization.yaml.