diff --git a/docs/cmd/kn_channel_create.md b/docs/cmd/kn_channel_create.md index 849ea4ec0..efe2a1e7e 100644 --- a/docs/cmd/kn_channel_create.md +++ b/docs/cmd/kn_channel_create.md @@ -19,7 +19,7 @@ kn channel create NAME kn channel create imc1 --type messaging.knative.dev:v1:InMemoryChannel # Create a channel 'k1' of type KafkaChannel - kn channel create k1 --type messaging.knative.dev:v1alpha1:KafkaChannel + kn channel create k1 --type messaging.knative.dev:v1beta1:KafkaChannel ``` ### Options @@ -27,7 +27,7 @@ kn channel create NAME ``` -h, --help help for create -n, --namespace string Specify the namespace to operate in. - --type string Override channel type to create, in the format '--type Group:Version:Kind'. If flag is not specified, it uses default messaging layer settings for channel type, cluster wide or specific namespace. You can configure aliases for channel types in kn config and refer the aliases with this flag. You can also refer inbuilt channel type InMemoryChannel using an alias 'imc' like '--type imc'. Examples: '--type messaging.knative.dev:v1alpha1:KafkaChannel' for specifying explicit Group:Version:Kind. + --type string Override channel type to create, in the format '--type Group:Version:Kind'. If flag is not specified, it uses default messaging layer settings for channel type, cluster wide or specific namespace. You can configure aliases for channel types in kn config and refer the aliases with this flag. You can also refer inbuilt channel type InMemoryChannel using an alias 'imc' like '--type imc'. Examples: '--type messaging.knative.dev:v1beta1:KafkaChannel' for specifying explicit Group:Version:Kind. ``` ### Options inherited from parent commands diff --git a/docs/cmd/kn_subscription_create.md b/docs/cmd/kn_subscription_create.md index 08750fdae..261c58fda 100644 --- a/docs/cmd/kn_subscription_create.md +++ b/docs/cmd/kn_subscription_create.md @@ -14,13 +14,13 @@ kn subscription create NAME kn subscription create sub0 --channel imcv1beta1:pipe0 --sink ksvc:receiver # Create a subscription 'sub1' from KafkaChannel 'k1' to ksvc 'mirror', reply to a broker 'nest' and DeadLetterSink to a ksvc 'bucket' - kn subscription create sub1 --channel messaging.knative.dev:v1alpha1:KafkaChannel:k1 --sink mirror --sink-reply broker:nest --sink-dead-letter bucket + kn subscription create sub1 --channel messaging.knative.dev:v1beta1:KafkaChannel:k1 --sink mirror --sink-reply broker:nest --sink-dead-letter bucket ``` ### Options ``` - --channel string Specify the channel to subscribe to. For the default channel, just use the name (e.g. 'mychannel'). A mapped channel type like 'imc' can be used as a prefix (e.g. 'imc:mychannel'). Finally you can specify the full coordinates to the referenced channel with Group:Version:Kind:Name (e.g. 'messaging.knative.dev:v1alpha1:KafkaChannel:mychannel'). + --channel string Specify the channel to subscribe to. For the default channel, just use the name (e.g. 'mychannel'). A mapped channel type like 'imc' can be used as a prefix (e.g. 'imc:mychannel'). Finally you can specify the full coordinates to the referenced channel with Group:Version:Kind:Name (e.g. 'messaging.knative.dev:v1beta1:KafkaChannel:mychannel'). -h, --help help for create -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 HTTP URI, '--sink ksvc:receiver' or simply '--sink receiver' for a Knative service 'receiver' in the current namespace. '--sink special.eventing.dev/v1alpha1/channels:pipe' for GroupVersionResource of v1alpha1 'pipe'. If a prefix is not provided, it is considered as a Knative service in the current namespace. diff --git a/pkg/kn/commands/channel/create.go b/pkg/kn/commands/channel/create.go index d2aa5b2fe..048958895 100644 --- a/pkg/kn/commands/channel/create.go +++ b/pkg/kn/commands/channel/create.go @@ -42,7 +42,7 @@ func NewChannelCreateCommand(p *commands.KnParams) *cobra.Command { kn channel create imc1 --type messaging.knative.dev:v1:InMemoryChannel # Create a channel 'k1' of type KafkaChannel - kn channel create k1 --type messaging.knative.dev:v1alpha1:KafkaChannel`, + kn channel create k1 --type messaging.knative.dev:v1beta1:KafkaChannel`, RunE: func(cmd *cobra.Command, args []string) (err error) { if len(args) != 1 { diff --git a/pkg/kn/commands/subscription/create.go b/pkg/kn/commands/subscription/create.go index 8a9303ed1..f2f9019ab 100644 --- a/pkg/kn/commands/subscription/create.go +++ b/pkg/kn/commands/subscription/create.go @@ -44,7 +44,7 @@ func NewSubscriptionCreateCommand(p *commands.KnParams) *cobra.Command { kn subscription create sub0 --channel imcv1beta1:pipe0 --sink ksvc:receiver # Create a subscription 'sub1' from KafkaChannel 'k1' to ksvc 'mirror', reply to a broker 'nest' and DeadLetterSink to a ksvc 'bucket' - kn subscription create sub1 --channel messaging.knative.dev:v1alpha1:KafkaChannel:k1 --sink mirror --sink-reply broker:nest --sink-dead-letter bucket`, + kn subscription create sub1 --channel messaging.knative.dev:v1beta1:KafkaChannel:k1 --sink mirror --sink-reply broker:nest --sink-dead-letter bucket`, RunE: func(cmd *cobra.Command, args []string) (err error) { if len(args) != 1 { diff --git a/pkg/kn/flags/channel_types.go b/pkg/kn/flags/channel_types.go index 3a79a585e..58d0e96a3 100644 --- a/pkg/kn/flags/channel_types.go +++ b/pkg/kn/flags/channel_types.go @@ -54,7 +54,7 @@ func (i *ChannelTypeFlags) Add(f *pflag.FlagSet) { "If flag is not specified, it uses default messaging layer settings for channel type, cluster wide or specific namespace. "+ "You can configure aliases for channel types in kn config and refer the aliases with this flag. "+ "You can also refer inbuilt channel type InMemoryChannel using an alias 'imc' like '--type imc'. "+ - "Examples: '--type messaging.knative.dev:v1alpha1:KafkaChannel' for specifying explicit Group:Version:Kind.") + "Examples: '--type messaging.knative.dev:v1beta1:KafkaChannel' for specifying explicit Group:Version:Kind.") for _, p := range config.GlobalConfig.ChannelTypeMappings() { //user configuration might override the default configuration @@ -94,7 +94,7 @@ func (i *ChannelRef) Add(f *pflag.FlagSet) { "just use the name (e.g. 'mychannel'). A mapped channel type like 'imc' "+ "can be used as a prefix (e.g. 'imc:mychannel'). "+ "Finally you can specify the full coordinates to the referenced channel "+ - "with Group:Version:Kind:Name (e.g. 'messaging.knative.dev:v1alpha1:KafkaChannel:mychannel').") + "with Group:Version:Kind:Name (e.g. 'messaging.knative.dev:v1beta1:KafkaChannel:mychannel').") } // Parse parses the CLI value for channel ref flag and populates object reference or return error