-
Notifications
You must be signed in to change notification settings - Fork 706
[UX-747] rpk shadow: enable --print-template for cloud #29098
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UX-747] rpk shadow: enable --print-template for cloud #29098
Conversation
We chose to manually inject the string instead of generating a full comment registry for just 2 fields. If the configuration for cloud expands we can revisit this mechanism.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enables the --print-template flag to work with --for-cloud in the rpk shadow config generate command. The implementation manually injects cloud-specific fields (name and cloud_options) into the template rather than generating them through the comment registry, as these fields are not part of the admin/v2 proto definitions.
Key changes:
- Added comments to
CloudShadowLinkOptionsfields in the type definition - Modified template generation to conditionally include cloud-specific header and fields
- Added cloud parameter to template writing functions to filter out cloud-incompatible options (like
tls_file_settings)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/go/rpk/pkg/cli/shadow/types.go | Added documentation comments to CloudShadowLinkOptions struct fields |
| src/go/rpk/pkg/cli/shadow/config.go | Updated template generation logic to support cloud mode with manual injection of cloud-specific fields and conditional filtering |
| sb.WriteString("# Shadow Link Configuration Template\n") | ||
| } | ||
|
|
||
| // Manually add name field (not in ShadowLinkConfigurations proto, but in ShadowLink) |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'Configuations' to 'Configurations' in comment.
|
Cc: @paulohtb6 @micheleRP, this was originally not supported when we released, it will be supported in the next patch release 👍 |
CI test resultstest results on build#78307
|
|
/backport v25.3.x |
We chose to manually inject the string instead of
generating a full comment registry for just 2
fields. If the configuration for cloud expands we
can revisit this mechanism.
Sample
Backports Required
Release Notes
Features