-
Notifications
You must be signed in to change notification settings - Fork 350
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
Cannot load Knative configuration from file or env variable #5402
Comments
Hello Matthias, I think this error is happening when K_SINK envvar injection is not happening for the Integration deployment. I recall that the K_SINK injection requires Knative serving to be available on the cluster, too. You should be able to explicitly set the Knative broker as a property on the Pipe sink reference. I need to check for the property name. Do you have any idea how we could handle the Knative broker URL resolving for the Pipe when K_SINK and Knative serving is not available? |
I have no usage of Knative Serving, as that is a separate component. and I dont want to use it 😄 The pipe has the broker already, as reference: apiVersion: camel.apache.org/v1
kind: Pipe
metadata:
name: beer-source-pipe
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1
name: beer-source
sink:
properties:
cloudEventsType: com.corp.my.beer.source
ref:
kind: Broker
apiVersion: eventing.knative.dev/v1
name: kamelet This was working in the past, however for that I had to run a fewer other hacks, see the referenced commit above. (Those I now removed) |
I guess one of the hacks was to also install Knative serving. I do not fully understand how the Camel K operator should resolve the Knative broker URL if there is no serving available (with K_SINK SinkBinding injection). |
There was no serving installed. I just added the "serivce" CRD, but not more. A broker is an addressable type, see: https://knative.dev/docs/concepts/duck-typing/#addressable Really no serving is needed |
We have a resolver for addressables: And the addressable is basically a named type w/ a You can use it like here, where we want the addressable, err := r.Resolver.AddressableFromDestinationV1(ctx, trigger.Spec.Subscriber, trigger)
... That way you can resolve the URL. However, I guess you do not directly use our types (e.g. Destination or even KRefs), but we have wrappers for that. see |
okay, many thanks for the clarification. Addressable resolver makes sense and I recall that we have that in place somewhere else in Camel K, too. For the K_SINK injection - just to be sure. Does that mean that the K_SINK is injected by Knative eventing? Serving does not deal with K_SINK at all? Could be that we create the SinkBinding only when Knative serving is found on the cluster and that needs to be fixed in Camel K. |
From an historical POV, the initial integration with Knative was based on the addressable resolver (hand written) which lead to the Knative Environment as we were collecting much more info about the sink. Then, KNative added the |
OK. After I sorted the RBAC in #5410 and I was able to work around on this, by simply applying the Serving CRD.
|
I am having a look why Camel K requires Knative serving to use K_SINK SinkBinding |
- Use Knative profile when Serving or Eventing is installed on cluster - Make sure to enable Knative trait when Serving or Eventing is installed - Enable knative-service trait only when Knative Serving is installed
…installed - Use Knative profile when Serving or Eventing is installed on cluster - Make sure to enable Knative trait when Serving or Eventing is installed - Enable knative-service trait only when Knative Serving is installed - Garbage collect Serving and Eventing resources in gc trait only when Serving/Eventing is installed on the cluster - Do not use Serving service in Knative trigger when not installed on cluster - Use arbitrary Service as a subscriber in Knative trigger when Serving is not available
…installed - Use Knative profile when Serving or Eventing is installed on cluster - Make sure to enable Knative trait when Serving or Eventing is installed - Enable knative-service trait only when Knative Serving is installed - Garbage collect Serving and Eventing resources in gc trait only when Serving/Eventing is installed on the cluster - Do not use Serving service in Knative trigger when not installed on cluster - Use arbitrary Service as a subscriber in Knative trigger when Serving is not available
…installed - Use Knative profile when Serving or Eventing is installed on cluster - Make sure to enable Knative trait when Serving or Eventing is installed - Enable knative-service trait only when Knative Serving is installed - Garbage collect Serving and Eventing resources in gc trait only when Serving/Eventing is installed on the cluster - Do not use Serving service in Knative trigger when not installed on cluster - Use arbitrary Service as a subscriber in Knative trigger when Serving is not available
…installed - Use Knative profile when Serving or Eventing is installed on cluster - Make sure to enable Knative trait when Serving or Eventing is installed - Enable knative-service trait only when Knative Serving is installed - Garbage collect Serving and Eventing resources in gc trait only when Serving/Eventing is installed on the cluster - Do not use Serving service in Knative trigger when not installed on cluster - Use arbitrary Service as a subscriber in Knative trigger when Serving is not available
- Use Knative profile when Serving or Eventing is installed on cluster - Make sure to enable Knative trait when Serving or Eventing is installed - Enable knative-service trait only when Knative Serving is installed - Garbage collect Serving and Eventing resources in gc trait only when Serving/Eventing is installed on the cluster - Do not use Serving service in Knative trigger when not installed on cluster - Use arbitrary Service as a subscriber in Knative trigger when Serving is not available
…installed - Use Knative profile when Serving or Eventing is installed on cluster - Make sure to enable Knative trait when Serving or Eventing is installed - Enable knative-service trait only when Knative Serving is installed - Garbage collect Serving and Eventing resources in gc trait only when Serving/Eventing is installed on the cluster - Do not use Serving service in Knative trigger when not installed on cluster - Use arbitrary Service as a subscriber in Knative trigger when Serving is not available (cherry picked from commit d558b0d)
…installed - Use Knative profile when Serving or Eventing is installed on cluster - Make sure to enable Knative trait when Serving or Eventing is installed - Enable knative-service trait only when Knative Serving is installed - Garbage collect Serving and Eventing resources in gc trait only when Serving/Eventing is installed on the cluster - Do not use Serving service in Knative trigger when not installed on cluster - Use arbitrary Service as a subscriber in Knative trigger when Serving is not available
- Use Knative profile when Serving or Eventing is installed on cluster - Make sure to enable Knative trait when Serving or Eventing is installed - Enable knative-service trait only when Knative Serving is installed - Garbage collect Serving and Eventing resources in gc trait only when Serving/Eventing is installed on the cluster - Do not use Serving service in Knative trigger when not installed on cluster - Use arbitrary Service as a subscriber in Knative trigger when Serving is not available
…installed - Use Knative profile when Serving or Eventing is installed on cluster - Make sure to enable Knative trait when Serving or Eventing is installed - Enable knative-service trait only when Knative Serving is installed - Garbage collect Serving and Eventing resources in gc trait only when Serving/Eventing is installed on the cluster - Do not use Serving service in Knative trigger when not installed on cluster - Use arbitrary Service as a subscriber in Knative trigger when Serving is not available (cherry picked from commit apache/camel-k@1964bd6bf)
What happened?
Installing pure Knative Eventing (just upstream knative eventing) and Camel-K 2.3 via helm, from scripts:
But unable to use Eventing with a simple "beer source" kamelet/pipe. Doing so gives me the following in the pod of the pipe:
In the past I had to add a few hacks to get this working, but w/ the new 2.3.0 release out there I removed those hacks yesterday:
matzew/eventing-cloud-integraton@c607fa8
The fact that the error above says Failed to resolve endpoint: knative://event?apiVersion=eventing.knative.dev%2Fv1&cloudEventsType=com.corp.my.beer.source&kind=Broker seem to me wrong, b/c the addressable broker is there. and is ready:
Steps to reproduce
samples
app folder on the repo (https://github.com/matzew/eventing-cloud-integraton/tree/main/samples/01-local-integrations)Relevant log output
Camel K version
2.3.0
The text was updated successfully, but these errors were encountered: