Kubernetes Helm chart update tool
  • Go 99.2%
  • Makefile 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
renovate[bot] 85c61f2f79
feat(deps): update module golang.org/x/vuln/cmd/govulncheck ( v1.9.0 → v1.10.0 ) (#46)
| datasource | package                           | from   | to      |
| ---------- | --------------------------------- | ------ | ------- |
| go         | golang.org/x/vuln/cmd/govulncheck | v1.9.0 | v1.10.0 |
2026-11-27 02:52:58 +00:00
.github/workflows feat(deps): update module golang.org/x/vuln/cmd/govulncheck ( v1.9.0 → v1.10.0 ) (#46) 2026-11-27 02:52:58 +00:00
docs Correct usage and publishing documentation (#42) 2026-11-22 19:04:45 +03:00
.gitignore Add verified release checks 2026-10-11 15:42:04 +03:00
.golangci.yaml Adopt shared golangci-lint baseline 2026-11-09 07:58:12 +03:00
.goreleaser.yaml chore: prepare v1.0.1 release (#41) 2026-11-22 12:55:20 +03:00
cancellation_test.go Stop Helm updates on broken log pipes (#33) 2026-11-19 23:07:00 +03:00
cli_input_test.go Guard the default update directory and reuse Helm output storage (#35) 2026-11-19 23:32:58 +03:00
command_other.go fix: bound Helm commands and cancel queued updates (#9) 2026-10-29 17:46:27 +03:00
command_unix.go fix: bound Helm commands and cancel queued updates (#9) 2026-10-29 17:46:27 +03:00
discovery_fifo_test.go Require a regular file for Helm chart discovery (#32) 2026-11-19 22:40:27 +03:00
discovery_test.go fix: discover charts beneath Chart.yaml directories (#11) 2026-10-29 19:56:00 +03:00
go.mod Extend the shared Renovate preset and use Go 1.27.4 (#44) 2026-11-25 20:18:40 +03:00
go.sum Remove unused Kubernetes client code (#15) 2026-11-06 00:00:06 +03:00
help.go Fix update path resolution and CLI usage streams (#26) 2026-11-19 17:20:18 +03:00
log.go Preserve Helm diagnostics in redirected logs (#38) 2026-11-20 03:19:49 +03:00
log_test.go Preserve Helm diagnostics in redirected logs (#38) 2026-11-20 03:19:49 +03:00
main.go chore: prepare v1.0.1 release (#41) 2026-11-22 12:55:20 +03:00
Makefile Propagate gofmt failures from make lint (#36) 2026-11-19 23:58:42 +03:00
makefile_test.go Propagate gofmt failures from make lint (#36) 2026-11-19 23:58:42 +03:00
README.md Correct usage and publishing documentation (#42) 2026-11-22 19:04:45 +03:00
renovate.json Extend the shared Renovate preset and use Go 1.27.4 (#44) 2026-11-25 20:18:40 +03:00
subcommands.go Guard the default update directory and reuse Helm output storage (#35) 2026-11-19 23:32:58 +03:00
update.go Fix Helm update diagnostics for mixed and verbose runs (#31) 2026-11-19 21:01:01 +03:00
update_test.go Fix Helm update diagnostics for mixed and verbose runs (#31) 2026-11-19 21:01:01 +03:00
util.go Guard the default update directory and reuse Helm output storage (#35) 2026-11-19 23:32:58 +03:00
util_test.go Guard the default update directory and reuse Helm output storage (#35) 2026-11-19 23:32:58 +03:00
VERSION chore: prepare v1.0.1 release (#41) 2026-11-22 12:55:20 +03:00
version_test.go Report CLI version write failures (#37) 2026-11-20 00:07:25 +03:00

k8s-tools

Update Helm chart dependencies in a directory and its child directories.

k8s-tools update ./charts
k8s-tools -threads 4 --command-timeout 2m update ./charts
k8s-tools --version

The update command runs helm dependency update for each discovered chart. Helm must be available on PATH. Without a directory argument, the command searches $HOME/repos. If HOME is unset or empty, specify a directory. Explicit directory arguments are used literally; the shell handles any desired variable expansion. Only one directory argument is accepted. Extra arguments (including flags placed after the directory) fail before discovery or Helm execution; global flags must precede update.

Relative Helm path overrides such as HELM_REPOSITORY_CONFIG=./repositories.yaml and HELM_REGISTRY_CONFIG=./registry.json resolve from the directory where you run k8s-tools. Helm runs each update in the corresponding chart directory.

Individual chart failures are logged, and independent charts continue processing. The command exits with status 0 only when every discovered chart succeeds (including when no charts are found). It exits with status 1 if any chart fails or chart discovery fails; the final error lists every failed chart path. --threads defaults to the number of CPUs available to the process, must be greater than zero, and must precede update; invalid concurrency exits with status 1 before chart discovery or Helm execution.

Each Helm invocation has a five-minute deadline, configurable with the global --command-timeout duration flag (for example 30s or 2m). The value must be positive and the flag must precede update. A timeout fails that chart and lets independent charts continue. SIGINT (Ctrl-C) or SIGTERM cancels discovery and scheduling, stops running Helm process groups on Linux/macOS, waits for workers, and exits with status 1. Previously recorded failures remain in the final error. Descendants that deliberately create a new process group/session are outside group cleanup; output-pipe waits are bounded to one additional second. Discovery checks cancellation between filesystem operations; an individual blocked filesystem call cannot be interrupted.

When a log write hits a closed pipe, the CLI stops active Helm process groups before exiting with SIGPIPE.

Helm diagnostics retain the last 64 KiB of combined stdout/stderr per command and mark truncated output. The final error includes each failed chart's diagnostics once, in discovery order. Use -v or --log-level debug to show output from successful Helm commands. The default log level is info; --log-level also accepts warn and error. -v takes precedence over --log-level.

Discovery updates root charts only: once a chart is found, its directory is not traversed, so vendored subcharts remain owned by their parent chart. Discovery does not follow symlinked directories encountered during the walk.

Discovery treats a missing Chart.yaml as a non-chart. Other filesystem errors (such as a symlink loop or inaccessible chart path) abort discovery with the affected path and exit status 1 before any Helm updates start. A directory named Chart.yaml is not a chart file.

Build and verify

Use the Go version in go.mod. Run make check for formatting, vet, race tests, and a local binary. Run make release-check with the GoReleaser version pinned in .github/workflows/checks.yaml to create Linux and macOS archives for amd64 and arm64 plus SHA-256 checksums without publishing.

VERSION records the application version. Keep it aligned with the default version in main.go and the release snapshot version. Release tags use v<VERSION>.

Release

The release workflow checks a version tag before publishing CLI archives and checksums to GitHub. Pull request checks use read-only repository access and no secrets. Only the tag-triggered publication job receives contents:write, using the job's short-lived GITHUB_TOKEN. No repository secrets are required.

Publishing and manual recovery: Publishing.