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

Knative installation check is wrong #4962

Closed
matzew opened this issue Dec 5, 2023 · 7 comments · Fixed by #5026
Closed

Knative installation check is wrong #4962

matzew opened this issue Dec 5, 2023 · 7 comments · Fixed by #5026
Assignees
Labels
area/knative Related to Knative kind/bug Something isn't working

Comments

@matzew
Copy link
Member

matzew commented Dec 5, 2023

What happened?

I have Knative Eventing installed, but b/c of how the code is written, the knative.IsInstalled check in knative_ref.go is returning false
https://github.com/christophd/camel-k/blob/169b7a15901e3a04b094544ee359da19a6931c7b/pkg/util/bindings/knative_ref.go#L56

See here:
https://github.com/apache/camel-k/blob/main/pkg/util/test/client.go#L207-L213

It just checks for "serving", which is only one part of Knative. Eventing can be installed w/o serving

Steps to reproduce

No response

Relevant log output

k describe pipes.camel.apache.org timer-source-pipe 
Name:         timer-source-pipe
Namespace:    default
Labels:       <none>
Annotations:  <none>
API Version:  camel.apache.org/v1
Kind:         Pipe
Metadata:
  Creation Timestamp:  2023-12-05T07:45:21Z
  Generation:          1
  Resource Version:    4218
  UID:                 3e173b0e-8489-4f5b-bd1c-22d3d5dcc9a6
Spec:
  Sink:
    Ref:
      API Version:  eventing.knative.dev/v1
      Kind:         Broker
      Name:         default
  Source:
    Properties:
      Message:  hello world
    Ref:
      API Version:  camel.apache.org/v1
      Kind:         Kamelet
      Name:         timer-source
Status:
  Conditions:
    Last Transition Time:  2023-12-05T07:45:21Z
    Last Update Time:      2023-12-05T07:45:21Z
    Message:               could not determine sink URI: integration referencing Knative endpoint 'default' that cannot run, because Knative is not installed on the cluster
    Reason:                Couldn't create an Integration custom resource
    Status:                False
    Type:                  IntegrationError
  Observed Generation:     1
  Phase:                   Error
Events:
  Type     Reason        Age   From                     Message
  ----     ------        ----  ----                     -------
  Warning  KameletError  14s   camel-k-pipe-controller  Cannot reconcile Pipe timer-source-pipe: could not determine sink URI: integration referencing Knative endpoint 'default' that cannot run, because Knative is not installed on the cluster


### Camel K version

latest
@matzew matzew added the kind/bug Something isn't working label Dec 5, 2023
@matzew
Copy link
Member Author

matzew commented Dec 5, 2023

I guess it is better to just resolve the "addressable", for the sink address?

@matzew
Copy link
Member Author

matzew commented Dec 5, 2023

(of course installing serving "fixes" it)

@christophd
Copy link
Contributor

thanks @matzew! yes, makes sense we should improve the Knative installation check

one more thing. please be careful to reference my fork (christophd) of the camel-k repository 😄 it might not be up-to-date all the time 😁

@christophd christophd added the area/knative Related to Knative label Dec 5, 2023
@matzew
Copy link
Member Author

matzew commented Dec 5, 2023

one more thing. please be careful to reference my fork (christophd) of the camel-k repository 😄 it might not be up-to-date all the time

Oh, I have not noticed this - I came there via Github code search 🤣

@claudio4j
Copy link
Contributor

We should probably add the eventing to https://github.com/apache/camel-k/blob/main/pkg/util/knative/apis.go#L138

@eshepelyuk
Copy link

Hi all
I am seeing the same error, jfyi.

@matzew
Copy link
Member Author

matzew commented Apr 24, 2024

See #5402
this is still required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/knative Related to Knative kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants