Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

ChartKit - CLI tooling for managing Helm charts and dependencies

Requires uv to run.

$ uv run chartkit --help Usage: chartkit [OPTIONS] COMMAND [ARGS]... ChartKit: CLI tooling for Helm chart dependencies and utilities. Options: -r, --roots TEXT Root directories to scan for Helm charts. Can be specified multiple times. --internal-only Only include dependencies that are also found in the scanned charts. --version Show the version and exit. --help Show this message and exit. Commands: chart Prints Helm either a single chart details or the a... charts Prints Helm chart dependencies. mermaid Generates a diagram of Helm chart dependencies. update-dependencies Updates the dependencies for all charts. version Manage chart versions.

Charts Command

Collects and generates a depenency graph for the given root paths.

$ uv run chartkit charts --help Usage: chartkit charts [OPTIONS] Prints Helm chart dependencies. Options: --json Output as JSON. --help Show this message and exit.

Chart Command

Displays information about a single chart. Can print dependency/dependent tree for the given chart or chart details.

$ uv run chartkit chart --help Usage: chartkit chart [OPTIONS] CHART Prints Helm either a single chart details or the a tree of dependents or dependencies. Options: --json Output as JSON. --mode [dependency|dependent|info] Type of tree to display. --help Show this message and exit.

View the depency tree of a single chart

uv run chartkit chart mozcloud --mode dependency

Mermaid Command

Generates mermaid charts of the previously selected chart dependency graph

$ uv run chartkit mermaid --help Usage: chartkit mermaid [OPTIONS] [CHART] Generates a diagram of Helm chart dependencies. Options: --include-attrs Include chart attributes (version, type) in the diagram. --output TEXT Text output file for the diagram. --svg-output TEXT SVG output file for the diagram. --help Show this message and exit.

Generate mermaid chart to stdout

uv run chartkit mermaid

Generate mermaid chart svg

uv run chartkit mermaid --svg-output mozcloud.svg mozcloud

Update Dependencies Command

Does a depth first traversal of all charts found in the root directories and performs a helm dep update if the chart has dependencies

Example Usage

$ uv run chartkit update-dependencies --help Usage: chartkit update-dependencies [OPTIONS] [CHARTS]... Updates the dependencies for all charts. Options: --all Update all chart dependencies. --dry-run Show what would be changed, but do not write changes. --help Show this message and exit.

Version Management

chartkit can be used to manage the version of individual charts and cascade those version updates across dependent charts.

List dependent tree and version details

Shows a list of charts that are dependent on a single chart or a list of charts and their version information.

$ uv run chartkit version list --help Usage: chartkit version list [OPTIONS] [CHARTS]... Lists the versions of all charts. Options: --help Show this message and exit.
Example
uv run chartkit version list mozcloud

Bump version

Bumps the version of a chart and cascades to dependents.

Note

Deprecated charts are ignored.

$ uv run chartkit version bump --help Usage: chartkit version bump [OPTIONS] [CHARTS]... Bumps the version of a chart and cascades to dependents. Deprecated charts are ignored. Options: --part [major|minor|patch] Part of the version to bump. --dry-run Show what would be changed, but do not write changes. --json Output results as JSON. --help Show this message and exit.
Example

For example you can take a list of changed charts and update all their versions and dependencies in one command:

$ uv run chartkit version bump \ mozcloud-gateway \ mozcloud-gateway-lib \ Updating chart versions: mozcloud-gateway: 0.4.28 - dependency: mozcloud-gateway-lib -> 0.4.25 mozcloud-gateway-lib: 0.4.25 mozcloud: 0.10.2 - dependency: mozcloud-gateway-lib -> 0.4.25 Chart versions updated.

Check Versions

Checks staged charts and compares their versions to the current branch HEAD version. If the versions match (indicating a bump is necessary) the command will fail. This is specifically useful as a pre-commit check

Example
$ uv run chartkit version check --help Usage: chartkit version check [OPTIONS] [CHARTS]... Checks the previous version of a chart against a specific commit. If the file has changed but not the version, it indicates that a version bump is needed. Options: --commit TEXT Git commit to check against (default: HEAD). --help Show this message and exit.