Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binding from a Strimzi CR is not properly decoded #4336

Closed
lburgazzoli opened this issue May 8, 2023 · 1 comment · Fixed by #4344
Closed

Binding from a Strimzi CR is not properly decoded #4336

lburgazzoli opened this issue May 8, 2023 · 1 comment · Fixed by #4344
Labels
area/kafka kind/bug Something isn't working
Milestone

Comments

@lburgazzoli
Copy link
Contributor

lburgazzoli commented May 8, 2023

I've created the following KameletBinding using a pre-built container image that should bridge Kafka and Slack.

apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
  name: kafka-to-slack
  annotations:
    "trait.camel.apache.org/container.image": "quay.io/rhoas/cos-connector-slack:main-65c1e78930846874d2c0414db67bcc60302e9943"
    "trait.camel.apache.org/kamelets.enabled": "false"
    "trait.camel.apache.org/jvm.enabled": "false"
    "trait.camel.apache.org/mount.configs": "[ \"secret:slack\" ]"
spec:
  source:
    ref:
      kind: Kafka
      apiVersion: kafka.strimzi.io/v1beta2
      name: rhoc-cluster
    properties:
      topic: datagen-out
  sink:
    ref:
      kind: Kamelet
      apiVersion: camel.apache.org/v1alpha1
      name: slack-sink
    properties:
      channel: "#demo"
      webhookUrl: "foo/bar"

However in the resulting integration code, the Kafka ref is translated to Knative

apiVersion: v1
kind: ConfigMap
metadata:
 name: kafka-to-slack-source-000
data:
 content: |
   - route:
       from:
         steps:
         - to: kamelet:cos-slack-sink/sink
         uri: knative:endpoint/rhoc-cluster?apiVersion=kafka.strimzi.io%2Fv1beta2&kind=Kafka&topic=datagen-out
       id: binding

I would expect this binding to decode the Kafka ref to a kafka endpoint/kamelet in the generated code

@squakez squakez added kind/bug Something isn't working area/kafka labels May 8, 2023
@squakez squakez modified the milestones: 1.12.1, 2.0.0 May 8, 2023
@lburgazzoli
Copy link
Contributor Author

so it turn out that the strimzi addon supports only the KafkaTopic CRD and I've tested that it works however, the camel-k operator should not fallback to knative if the ref cannot be resolved by any other addon.

christophd added a commit to christophd/camel-k that referenced this issue May 8, 2023
- Only run the binding provider when Knative is installed on the cluster
- Only run the binding provider when referencing a known Knative resource (e.g. broker, channel, service)
christophd added a commit to christophd/camel-k that referenced this issue May 9, 2023
- Only run the binding provider when Knative is installed on the cluster
- Only run the binding provider when referencing a known Knative resource (e.g. broker, channel, service)
squakez pushed a commit that referenced this issue May 9, 2023
- Only run the binding provider when Knative is installed on the cluster
- Only run the binding provider when referencing a known Knative resource (e.g. broker, channel, service)
christophd added a commit to christophd/camel-k that referenced this issue May 9, 2023
- Only run the binding provider when Knative is installed on the cluster
- Only run the binding provider when referencing a known Knative resource (e.g. broker, channel, service)
christophd added a commit to christophd/camel-k that referenced this issue May 9, 2023
…lpha1

- Also restrict v1alpha1 binding provider
- Only run the binding provider when Knative is installed on the cluster
- Only run the binding provider when referencing a known Knative resource (e.g. broker, channel, service)
christophd added a commit to christophd/camel-k that referenced this issue May 9, 2023
- Only run the binding provider when Knative is installed on the cluster
- Only run the binding provider when referencing a known Knative resource (e.g. broker, channel, service)
squakez pushed a commit that referenced this issue May 10, 2023
- Also restrict v1alpha1 binding provider
- Only run the binding provider when Knative is installed on the cluster
- Only run the binding provider when referencing a known Knative resource (e.g. broker, channel, service)
christophd added a commit to christophd/camel-k that referenced this issue May 10, 2023
- Only run the binding provider when Knative is installed on the cluster
- Only run the binding provider when referencing a known Knative resource (e.g. broker, channel, service)
squakez pushed a commit that referenced this issue May 10, 2023
- Only run the binding provider when Knative is installed on the cluster
- Only run the binding provider when referencing a known Knative resource (e.g. broker, channel, service)
squakez pushed a commit that referenced this issue May 10, 2023
- Only run the binding provider when Knative is installed on the cluster
- Only run the binding provider when referencing a known Knative resource (e.g. broker, channel, service)
squakez pushed a commit to jboss-fuse/camel-k that referenced this issue May 10, 2023
- Only run the binding provider when Knative is installed on the cluster
- Only run the binding provider when referencing a known Knative resource (e.g. broker, channel, service)

(cherry picked from commit apache/camel-k@d7065e014)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kafka kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants