All notable changes to Harpoon (hpn) will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- list-images → extract: The subcommand that extracts image list from Helm charts has been renamed to
extract. The namelist-imagesremains available as an alias for backward compatibility.
hpn logoutcommand: Logs out from a registry using the active container runtime (hpn logout registry.example.com).- Generic worker pool (
cmd/hpn/worker.go):runWorkerPool[J any]replaces the duplicated goroutine+channel pattern across pull, push, save, and load; honours context cancellation. - Retry-with-backoff utility (
cmd/hpn/retry.go):retryWithBackoffusesselect { case <-ctx.Done() }during sleep so Ctrl+C during a backoff wait returns immediately. Logoutmethod onContainerRuntimeinterface — all four runtimes implement it.- Tests:
worker_test.go(8 cases) andretry_test.go(7 cases).
ContainerRuntime.Load()signature: AddedimageName stringparameter. Docker, Podman, and Nerdctl ignore it; Skopeo uses it as the copy destination reference.--outputflag forhpn save: Marked deprecated via Cobra'sMarkDeprecated;--pathis now the canonical flag. Backwards-compatible during a transition period.- SIGINT / SIGTERM handling:
signal.NotifyContextnow cancels the active operation immediately on Ctrl+C instead of waiting for the current subprocess to finish. - CI workflow:
go test -race ./...andgolangci-lintadded as required checks;actions/setup-goupgraded to v5 with caching.
readImageListwrong line numbers: Validation now runs on pre-deduplication lines with original line numbers tracked per entry.- Skopeo
Pull()no-op: Previously copied to/tmpthen immediately deleted; now copies directly to the first available daemon store. - Nerdctl unconditional
--insecure-registry: Removed fromPull()andPush()defaults; TLS is now verified by default. - Duplicate
--path/--outputflags insave: Resolved silent conflict;--outputdeprecated,--pathis canonical. - Dead code in
checksum.go: RemovedverifyChecksum(duplicate ofVerifyTarChecksum) andtrimWhitespace(reimplementedstrings.TrimSpace).
- Password exposure in process table: All runtimes now use
--password-stdin— credentials never appear inpsoutput. - TOCTOU / symlink attacks in Skopeo: Replaced predictable
/tmp/skopeo-*paths withos.MkdirTemp("", "hpn-skopeo-*"). - Save directory permissions:
os.MkdirAll(saveDir, 0700)— was0755. - Checksum file permissions: Written with
0600— was0644. - Auth directory permissions:
os.MkdirAll(dir, 0700)— was0755.
- Project logo: New
logo.pngat repo root, used in README. - CONTRIBUTING.md: Build, test, vet, code style (gofmt, English comments), PR process, exit code and logging notes.
- Package doc comments:
pkg/errorsandinternal/runtimeforgo docvisibility. - Cmd tests: Table-driven tests for
readImageListandmergeExtraArgsincmd/hpn/common_test.go. - CI:
go mod verify,go mod tidycheck, andgo vet ./...in the test workflow.
- Subcommand registration: All subcommands (pull, save, load, push, login, ls, rmi) now registered centrally in
root.go. - Comments: All Go comments in runtime packages (interface, docker, podman, nerdctl, skopeo) translated to English.
- Exit codes: CLI now uses 0 (success), 1 (runtime/operational error), 2 (usage error). Scripts can rely on exit code 2 for missing required flags or invalid arguments.
- Usage error messages: User-facing messages for missing
-f,--chart, or--registryno longer append ": usage".
- .gitignore: Added
images/(default save/load output directory).
- list-images: New
hpn list-imagessubcommand to extract container image lists from Helm charts (remote or local tgz/dir). Output is one image per line, compatible withhpn pull -f/hpn push -f. Requires Helm CLI; use--chart,--version,-f/--values,-o/--output,--release-name. - ls: New
hpn lssubcommand (aliaslist) with three modes: (1)hpn lslists images in the local runtime (Docker/Podman/Nerdctl); (2)hpn ls --path ./imageslists saved tar files in a directory with IMAGE, SIZE, CHECKSUM; (3)hpn ls -f images.txtchecks whether images from a file exist in the runtime or in--path. Skopeo is not supported (no local image store). - rmi: New
hpn rmisubcommand to remove images from the local runtime using-f <file>. No interactive confirmation; supports passthrough args (e.g.hpn rmi -f list.txt -- -ffor force). Supported runtimes: Docker, Podman, Nerdctl; Skopeo returns an error. - internal/chart: New package for chart fetch,
helm template, and YAML image extraction with filtering (embedded refs in args; excludes URLs, metric names, unix sockets). - Runtime interface: New
RemoveImage(ctx, image, RmiOptions)andListImages(ctx)onContainerRuntime;ImageNameFromTarFilenameininternal/runtime/checksum.gofor reversing tar filenames to image names.
- list-images filtering: Image extraction now filters out non-image strings (URLs, Prometheus metric names,
unix:///tcp:///fd://prefixes, port-only tags) to reduce false positives in chart image lists.
This release introduces a major CLI architecture refactoring, adds unified registry authentication, integrates Skopeo support, and includes numerous improvements for better usability and maintainability.
- Login Command: New
hpn loginsubcommand for unified registry authentication- Supports Docker, Podman, Skopeo, and Nerdctl runtimes
- Interactive password input (most secure, hidden input)
- Stdin password support for CI/CD pipelines (
--password-stdin) - Environment variable support (
REGISTRY_USERNAME,REGISTRY_PASSWORD) - Insecure registry support (
--insecureflag for HTTP or self-signed certificates) - Automatic runtime detection or manual specification via
--runtime
- Authentication Utilities: New
internal/runtime/auth.gofor managing authentication files- Support for Docker (
~/.docker/config.json) and Podman/Skopeo (~/.config/containers/auth.json) - Automatic authentication file path detection based on runtime
- Secure credential storage with proper file permissions (0600)
- Support for Docker (
- Skopeo Integration: Added Skopeo as a new container runtime option
- Full support for pull, save, load, and push operations
- Daemonless image operations (no Docker daemon required)
- Multi-architecture image support
- Automatic detection and fallback support
- Debug Mode: Added
--debugflag for detailed troubleshooting- Shows full stdout/stderr from underlying container commands
- Enhanced error messages with detailed context
- Useful for diagnosing runtime issues
- Progress Bars: Visual progress indicators for long-running operations
- Real-time progress display for pull, save, load, and push operations
- Multi-bar support for concurrent operations
- Automatic terminal width detection and formatting
- Makefile: Added Makefile wrapper for build.sh
make build- Build for current platformmake build-all- Build for all platformsmake clean- Clean build artifactsmake test- Run testsmake install- Install to /usr/local/bin
- Standardized Build Output: All binaries now output to
dist/directory- Follows industry-standard project structure
- Cleaner project root directory
- Better organization of build artifacts
- Subcommand-based CLI: Refactored from action-based to subcommand-based architecture
- Removed
-a, --actionparameter - Commands now use subcommands:
hpn pull,hpn save,hpn load,hpn push,hpn login - Follows industry standards (similar to docker, kubectl)
- Better command discovery and help organization
- Removed
- Parameter Simplification: Removed all
--*-modeparameters- Removed
--save-mode,--load-mode,--push-mode - Save/Load operations now use
--pathparameter (default:./images) - Save operation supports multi-level paths (e.g.,
--path ./output/images/prod) - Load operation supports
--recursiveflag for recursive loading - Push operation uses flexible naming with three intuitive modes:
- Default: preserve original paths (
--registry new-registry.com) - Append path: prepend path to original (
--registry new-registry.com/path/xx) - Unified project: all images to single project (
--registry new-registry.com --project newproject)
- Default: preserve original paths (
- Removed
- Parameter Scoping: Command-specific parameters now scoped to their subcommands
- Push-specific parameters (
--registry,--project) only visible inhpn push -h - Cleaner root command help output
- Better parameter organization
- Push-specific parameters (
- Configuration Schema Update: Removed
modessection, addedpathssection- Removed
modes.save_mode,modes.load_mode,modes.push_mode - Added
paths.save_pathandpaths.load_pathfields - Default paths:
./imagesfor both save and load - More intuitive and flexible configuration
- Removed
- CLI User Experience:
- Clearer command structure with subcommands
- More intuitive parameter organization
- Enhanced help information with subcommand-specific parameters
- Better error messages with actionable suggestions
- Image Pull Strategy:
- Retry mechanism with exponential backoff
- Configurable concurrency with worker pools
- Platform parameter support (
--platform linux/amd64,linux/arm64,all) - Timeout optimization for better reliability
- File Operations:
- SHA256 checksum generation for saved tar files
- Resume support: skip re-saving if valid tar and checksum files exist
- Multi-level path support for better organization
- Project Structure:
- Reorganized documentation (moved RELEASE.md, DOWNLOAD.md to docs/)
- Removed unnecessary files (install.sh, demo/, benchmarks/)
- Cleaner project root directory
- Better separation of concerns
- Fixed empty
imagesdirectory creation when custom--pathis specified - Fixed Skopeo save operation platform issues on macOS
- Improved configuration validation to prevent unnecessary directory creation
- Enhanced error handling for missing runtime dependencies
- Removed
install.shscript (users can download directly from GitHub Releases) - Removed
demo/directory (examples integrated into documentation) - Removed
benchmarks/directory (not needed for CLI tool) - Removed
scripts/performance-analysis.sh(depended on benchmarks)
Pull Operations:
# Old
hpn -a pull -f images.txt
# New
hpn pull -f images.txtSave Operations:
# Old
hpn -a save -f images.txt --save-mode 2
# New
hpn save -f images.txt --path ./imagesLoad Operations:
# Old
hpn -a load --load-mode 2
# New
hpn load --path ./imagesPush Operations:
# Old
hpn -a push -f images.txt -r registry.com --push-mode 2
# New
hpn push -f images.txt --registry registry.com --project projectOld config.yaml:
modes:
save_mode: 2
load_mode: 2
push_mode: 2New config.yaml:
paths:
save_path: ./images
load_path: ./images- Updated all documentation to reflect new CLI syntax
- Added comprehensive migration guide
- Updated examples and quick start guide
- Added login command documentation
- Updated building guide with Makefile instructions
--runtimeparameter to manually specify container runtime (docker|podman|nerdctl)--auto-fallbackparameter for automatic runtime fallback in CI environments- Smart runtime detection with fallback mechanism
- Interactive runtime selection when configured runtime is unavailable
- Strict parameter validation to prevent misuse of mode parameters
- BREAKING: Removed Push Mode 3 (preserve original project path)
- BREAKING: Push Mode 2 now uses smart project name selection
- Project name selection priority: command line > config file > original image project
- Error messages are now concise without showing full help text
- Help text unified to English language
- Enhanced container runtime support with full interface integration
- Better error handling and user experience
- More reliable runtime availability detection
- Cleaner command-line interface
- Duplicate error messages when validation fails
- Cross-action mode parameter validation
- Runtime detection reliability issues
- Integrated
internal/runtimepackage interfaces - Replaced string-based runtime operations with type-safe interfaces
- Enhanced configuration management for runtime options
- Improved error propagation and display
- Initial release of Harpoon Go rewrite
- Support for pull, save, load, push operations
- Multiple container runtime support (Docker, Podman, Nerdctl)
- Flexible operation modes for save, load, and push
- Configuration file support
- Cross-platform compatibility (Linux, macOS, Windows)
- Proxy support for corporate environments
- Parallel processing capabilities
- Pull: Download images from registries
- Save: Export images to tar files with multiple modes
- Load: Import images from tar files with multiple modes
- Push: Upload images to registries with multiple modes
- Configuration: YAML-based configuration with environment variable support
- Logging: Structured logging with multiple output formats