Skip to content

Commit

Permalink
Remove unusable flag from cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
dsimansk committed Aug 10, 2023
1 parent 8dc8a9f commit 5d47074
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion docs/cmd/kn_trigger_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ kn trigger update NAME
### Options

```
--broker string Name of the Broker which the trigger associates with. (default "default")
--filter strings Key-value pair for exact CloudEvent attribute matching against incoming events, e.g type=dev.knative.foo
-h, --help help for update
-n, --namespace string Specify the namespace to operate in.
Expand Down
5 changes: 4 additions & 1 deletion pkg/kn/commands/trigger/update_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ func (f *TriggerUpdateFlags) GetUpdateFilters() (map[string]string, []string, er

// Add is to set parameters
func (f *TriggerUpdateFlags) Add(cmd *cobra.Command) {
cmd.Flags().StringVar(&f.Broker, "broker", "default", "Name of the Broker which the trigger associates with.")
if cmd.Name() != "update" {
// Spec.Broker is immutable field
cmd.Flags().StringVar(&f.Broker, "broker", "default", "Name of the Broker which the trigger associates with.")
}
// The Sugar controller was integrated into main Eventing controller. With that the default behavior was changed as well.
// Users need to configure 'Automatic Broker Creation' per linked docs.
// Deprecated in 1.4, remove in 1.6.
Expand Down

0 comments on commit 5d47074

Please sign in to comment.