Closed sayanh closed 7 years ago
cc @andresmgot
hi @sayanh,
by default the command sets the function trigger as PubSub so it is only possible to trigger it using Kafka messages, in case you want to call it with the kubeless function call
command you need to specify --trigger-http
when deploying your function:
kubeless function deploy testjs --runtime nodejs8 --handler hello.foo --from-file hello.js --namespace kubeless --trigger-http
This behavior may be indeed confusing, I opened https://github.com/kubeless/kubeless/issues/385 to modify that.
Thanks, it works fine now!
Although I am using the following function from https://github.com/kubeless/kubeless/tree/master/examples/nodejs:
it does not seem to be working.
Deploying in kubeless as follows:
kubeless function update testjs --runtime nodejs8 --handler testjs.foo --from-file hello.js --namespace kubeless
Following are my issues: 1) The function gets deployed with a default topic as
kubeless
which I had to create in kafka later. Can I not deploy a function without a topic the way I did for Python?2) But I am not able to invoke a js function : Invoking as:
and below is what I see in pod logs:
and output as: