Skip to content

Commit

Permalink
Mark --inject-broker flag as deprecated (#1665)
Browse files Browse the repository at this point in the history
Co-authored-by: David Simansky <dsimansk@redhat.com>
  • Loading branch information
knative-prow-robot and dsimansk committed Apr 28, 2022
1 parent ff097e9 commit c53658b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion docs/cmd/kn_trigger_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ kn trigger create NAME --sink SINK
--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 create
--inject-broker Create new broker with name default through common annotation
-n, --namespace string Specify the namespace to operate in.
-s, --sink string Addressable sink for events. You can specify a broker, channel, Knative service or URI. Examples: '--sink broker:nest' for a broker 'nest', '--sink channel:pipe' for a channel 'pipe', '--sink ksvc:mysvc:mynamespace' for a Knative service 'mysvc' in another namespace 'mynamespace', '--sink https://event.receiver.uri' for an URI with an 'http://' or 'https://' schema, '--sink ksvc:receiver' or simply '--sink receiver' for a Knative service 'receiver' in the current namespace. If a prefix is not provided, it is considered as a Knative service in the current namespace. If referring to a Knative service in another namespace, 'ksvc:name:namespace' combination must be provided explicitly.
```
Expand Down
1 change: 0 additions & 1 deletion docs/cmd/kn_trigger_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ kn trigger update NAME
--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
--inject-broker Create new broker with name default through common annotation
-n, --namespace string Specify the namespace to operate in.
-s, --sink string Addressable sink for events. You can specify a broker, channel, Knative service or URI. Examples: '--sink broker:nest' for a broker 'nest', '--sink channel:pipe' for a channel 'pipe', '--sink ksvc:mysvc:mynamespace' for a Knative service 'mysvc' in another namespace 'mynamespace', '--sink https://event.receiver.uri' for an URI with an 'http://' or 'https://' schema, '--sink ksvc:receiver' or simply '--sink receiver' for a Knative service 'receiver' in the current namespace. If a prefix is not provided, it is considered as a Knative service in the current namespace. If referring to a Knative service in another namespace, 'ksvc:name:namespace' combination must be provided explicitly.
```
Expand Down
6 changes: 6 additions & 0 deletions pkg/kn/commands/trigger/update_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ 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.")
// 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.
cmd.Flags().BoolVar(&f.InjectBroker, "inject-broker", false, "Create new broker with name default through common annotation")
cmd.Flags().MarkDeprecated("inject-broker", "effective since 1.4 and will be removed in 1.6 release. \n"+
"Please refer to 'Automatic Broker Creation' section for configuration options, "+
"https://knative.dev/docs/eventing/sugar/#automatic-broker-creation.")
cmd.Flags().StringSliceVar(&f.Filters, "filter", nil, "Key-value pair for exact CloudEvent attribute matching against incoming events, e.g type=dev.knative.foo")
}

0 comments on commit c53658b

Please sign in to comment.