Add an optional io.Writer parameter to newRegistryClient (and the
internal newDefaultRegistryClient / newRegistryClientWithTLS helpers)
so callers can control where registry client output goes.
All existing callers are unaffected (default remains os.Stderr).
For helm push, pass io.Discard so that the registry client's built-in
"Pushed:"/"Digest:" lines are suppressed. The --output writer
(WriteTable / WriteJSON / WriteYAML) is the single source of truth for
push result output, preventing duplication on the terminal.
Signed-off-by: Ilya Kiselev <kis-ilya-a@yandex.ru>
Address Copilot review feedback:
- WriteTable now uses "Pushed:"/"Digest:" labels consistent with the
registry client's built-in output (pkg/registry/client.go:746-747),
so the default --output table experience is familiar to existing users
- Add TestPushOutputFlagCompletion to verify the --output flag is
properly registered and offers json/yaml/table completions
- Document that Pusher.Push and action.Push.Run signature changes are
intentional breaking changes in the Helm v4 major release
Signed-off-by: Ilya Kiselev <kis-ilya-a@yandex.ru>
cmd/push: implement WriteTable to emit ref and digest
The WithPushOptWriter option and the out field on Push were never
wired to any meaningful output path — ChartUploader.Out is not read
by UploadTo() and the registry client manages its own writer.
Remove them to avoid dead API surface.
WriteTable now writes a tab-aligned REF/DIGEST result to the
command's stdout stream. The registry client continues to write
its own progress output to stderr, so there is no duplication.
Signed-off-by: Mentigen <mentigen@mentigen.ru>
Signed-off-by: Ilya Kiselev <kis-ilya-a@yandex.ru>
Add support for --output flag to 'helm push' command for machine-readable
output formats (JSON and YAML). This enables programmatic consumption of push
results and integration with tools like cosign for artifact signing.
Changes:
- Modified Pusher interface to return (*registry.PushResult, error)
- Updated OCIPusher.Push() and push() to return PushResult
- Updated action.Push.Run() to return (*registry.PushResult, error)
- Added output formatting to push command (table/json/yaml)
- Created pushResult struct with Ref and Digest fields
- Implemented pushWriter with WriteTable/WriteJSON/WriteYAML methods
- Updated test fixtures to handle new return signature
The default table format maintains backward compatibility with existing
plain-text output style.
Fixes#11735
Signed-off-by: Ilya Kiselev <kis-ilya-a@yandex.ru>
* feat(create): add hidden --chart-api-version flag
Add --chart-api-version flag to helm create command to allow selecting
chart API version (v2 or v3) when creating a new chart.
- Default is v2 (existing behavior unchanged)
- v3 uses internal/chart/v3 scaffold generator
- Invalid versions return clear error message
- Works with --starter flag
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* Add HELM_EXPERIMENTAL_CHART_V3 feature gate to create command
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* make chartv3 private and use loader to load the chart
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* Hide chart-api-version flag until chart v3 is officially released
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* Conditionally hide the --chart-api-version flag if chart v3 is not enabled
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* Add internal gates package for internal feature gates
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
* Add doc for internal/gates package
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
---------
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
Improve the description to explain the three usage scenarios:
- --wait alone defaults to 'watcher' strategy
- --wait=<value> uses the specified strategy
- flag omitted defaults to 'hookOnly'
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
The --api-versions flag was undocumented in the template command's
help text. This adds usage documentation and examples showing both
comma-separated and multiple flag usage patterns.
Fixes#13198
Signed-off-by: majiayu000 <1835304752@qq.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: majiayu000 <1835304752@qq.com>