Merge pull request #17429 from tanelmae/tools-apply-fix

Fix toolbox addons apply command
This commit is contained in:
Kubernetes Prow Robot 2025-06-20 14:24:51 -07:00 committed by GitHub
commit 9728daa90c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -35,15 +35,19 @@ func NewCmdToolboxAddons(out io.Writer) *cobra.Command {
f := channelscmd.NewChannelsFactory()
// create subcommands
cmd.AddCommand(&cobra.Command{
var applyOptions channelscmd.ApplyChannelOptions
applyCmd := &cobra.Command{
Use: "apply CHANNEL",
Short: "Applies updates from the given channel",
Example: "kops toolbox addons apply s3://<state_store>/<cluster_name>/addons/bootstrap-channel.yaml",
RunE: func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()
return channelscmd.RunApplyChannel(ctx, f, out, &channelscmd.ApplyChannelOptions{}, args)
return channelscmd.RunApplyChannel(ctx, f, out, &applyOptions, args)
},
})
}
applyCmd.Flags().BoolVar(&applyOptions.Yes, "yes", false, "Apply update")
cmd.AddCommand(applyCmd)
cmd.AddCommand(&cobra.Command{
Use: "list",
Short: "Lists installed addons",

View File

@ -19,6 +19,7 @@ kops toolbox addons apply s3://<state_store>/<cluster_name>/addons/bootstrap-cha
```
-h, --help help for apply
--yes Apply update
```
### Options inherited from parent commands