-
Notifications
You must be signed in to change notification settings - Fork 89
Missing PATH on kubeless.js runtime #62
Comments
My test escenario https://github.com/jcalonsoh/test-kubeless |
mm, I am not able to reproduce your issue, are you using an HTTP trigger? In my case, I have deployed the sample nodejs function and a simple HTTP trigger:
I can see the path logged when I am doing requests:
|
can you share your repo, please |
I am using the helloget example from this repo (I only added a https://github.com/kubeless/runtimes/blob/master/stable/nodejs/examples/helloget.js I am using kubeless 1.0.6. In your case, I believe it's an issue with the HTTP trigger/ingress configuration. How did you create it? What ingress controller are you using? |
Thanks I found out the problem, it's on plugin serverless-kubeless https://github.com/serverless/serverless-kubeless/blob/master/lib/deploy.js#L533 looks like there is no definition function to create HTTPTrigger apiVersion: kubeless.io/v1beta1
kind: HTTPTrigger
metadata:
name: cors-trigger
annotations:
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/cors-allow-methods: "GET"
spec:
function-name: get-python
host-name: example.com
path: echo I know there are 3 types of httptrigger, but at least can do something for at least nginx default type ? |
Ah, yes, the serverless-kubeless creates an Ingress resource directly rather than creating an HTTP Trigger (which is the Kubeless abstraction). I recommend you to use the In any case we are open to contributions for any project in case anyone wants to fix the issue there. |
Nice... I am looking forward. Better if you have a Doc to setup an dev env for help on issues. |
We have a bit of documentation for the Kubeless main project (https://kubeless.io/docs/dev-guide/) but unfortunately not here |
Is this a BUG REPORT or FEATURE REQUEST?:
BUG REPORT
What happened:
When I send request with path ping using kubeless.js middleware it send / instead of the path
What you expected to happen:
to send the path requested
How to reproduce it (as minimally and precisely as possible):
curl --header "Host: kubernetes.docker.internal.nip.io" localhost/ping
and logs says
on AWS, works fine: because there is path sending...
Anything else we need to know?:
I found out in runtime:
https://github.com/kubeless/runtimes/blob/master/stable/nodejs/lib/helper.js#L38-L50
there no funtion for *
I would expect something like:
I do not know if it works
Environment:
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020-02-13T18:08:14Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:07:57Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Kubeless version: v1.0.6
Docker 2 Machine
The text was updated successfully, but these errors were encountered: