mirror of https://github.com/kubernetes/kops.git
Merge pull request #17429 from tanelmae/tools-apply-fix
Fix toolbox addons apply command
This commit is contained in:
commit
9728daa90c
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue