knative-extensions / kn-plugin-source-kamelet

Kn plugin for managing Kamelets and KameletBindings
Apache License 2.0
2 stars 11 forks source link

Default Kamelets are not found when creating a binding #243

Open rhuss opened 11 months ago

rhuss commented 11 months ago

When creating a binding with e.g. kn source kamelet binding create my-source --broker default --kamelet chuck-norris-source and a global installation for the Camel-K operator, and the chuck-norris-source is available in the camel-system namespace, then the following error appears:

kn source kamelet binding create my-source --broker default --kamelet chuck-norris-source
Warning: v1apha1.Kamelet is deprecated, please, use v1.Kamelet instead
Error: kamelets.camel.apache.org "chuck-norris-source" not found
Usage:
  kn-source-kamelet binding create NAME [flags]

Examples:

  # Create Kamelet binding with source and sink.
  kn source kamelet binding create NAME

  # Add a binding properties
  kn source kamelet binding create NAME --kamelet=name --sink|broker|channel|service=<name> --property=<key>=<value>

Flags:
      --broker string             Uses a broker as binding sink.
      --ce-override stringArray   Customize cloud events property in the form of "<key>=<value>"
      --ce-spec string            Customize cloud events spec version provided to the binding sink.
      --ce-type string            Customize cloud events type provided to the binding sink.
      --channel string            Uses a channel as binding sink.
      --force                     Apply the changes even if the binding already exists.
  -h, --help                      help for create
      --kamelet string            Kamelet source.
  -n, --namespace string          Specify the namespace to operate in.
      --property stringArray      Add a source property in the form of "<key>=<value>"
      --service string            Uses a Knative service as binding sink.
  -s, --sink string               Sink expression to define the binding sink.

kamelets.camel.apache.org "chuck-norris-source" not found
Error: exit status 1

This is because the validation doesn't check the kamelet in the "system namespace". The challenge here is to find out what the system namespace is.

Several solution could be possible:

If nothing of this work, then there should be at least a way to skip the validation (like e.g. with a --force option)

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

rhuss commented 8 months ago

/remove-lifecycle stale