Comments (5)
There are several problems with that:
- Depending on the RBAC rules of the cluster the user may not be able to retrieve the logs from the controller.
- If the controller is processing a different request at the same time the logs entries may be intertwined.
- There are other possible error causes like a syntax error that won't appear in the controller logs.
What we could do is to print some tips (like the command you mention) for people to find the problem without the need to google the issue.
from serverless-kubeless.
Alright, that makes sense.
Not sure if related, but I'm getting deceptive messages when the handler is defined incorrectly.
What the user sees:
~/dev/serverless$ serverless deploy
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Deploying Kafka trigger: echo-hellotopic
Serverless: Updating existing Kafka trigger
$
(you would think it was successful)
What is actually happening
time="2018-06-06T20:27:10Z" level=error msg="Function can not be created/updated: failed: incorrect handler format. It should be module_name.handler_name" pkg=function-controller
time="2018-06-06T20:27:10Z" level=error msg="Error processing default/echo (will retry): failed: incorrect handler format. It should be module_name.handler_name" pkg=function-controller
To that effect I'm struggling to define a handler within a folder e.g the main
in dist/index.js
I was trying hander: dist.index.main
which doesn't seem to work
I just came across https://github.com/open-bot/open-bot/blob/master/handlers.js#L7..L12 but it seems super hacky, but maybe what I'm trying to do isn't supported
from serverless-kubeless.
mm, I see, I assume that's the output of an upgrade and I also assume that the first deployment was successfully performed. The problem with that is that the client submits the changes and see that there is a working deployment so it assumes that is has been successfully updated. We should fix that.
Regarding your problem with the handler, it is not possible to use folders, the serverless.yaml
file should be in the same directory than the function code. See #121. Note that you can still use an index.js file in the root folder (something like the link you posted but more simple):
index.js
module.exports = {
main: require('./lib/index').main,
}
And define the handler as index.main
.
from serverless-kubeless.
mm, I see, I assume that's the output of an upgrade and I also assume that the first deployment was successfully performed
Those assumptions are correct.
Thanks for the snippet -- In the above example are all files in lib
automatically packaged or do we have to supply package: include: - lib/
also? Happy to improve documentation on this front if I'm told where would be best appropriate
from serverless-kubeless.
yes, all the files in the directory of the serverless.yaml
are packaged except node_modules
by default.
We have documentation in both the serverless repo (more related to the serverless plugin) and in the kubeless one. Happy to have contributions in any of those sites if you want to clarify something.
from serverless-kubeless.
Related Issues (20)
- Inject kubernetes secrets to a function definition HOT 3
- Feature Request: Configurable retry limit/delay time when checking deployment status. HOT 4
- Redeploying only hello function fails with an error HOT 4
- Deploy of functions with runtime that has no depName HOT 2
- Manual ingress vs HTTP Trigger HOT 5
- Env variables in ~/.kube/config are skipped except AWS_PROFILE
- runtime nodejs12.x is not supported HOT 3
- Can't overwrite function name by using name option HOT 2
- Create Service of type NodePort without an ingress HOT 1
- tlsConfig not working v:0.10.0 HOT 7
- Is it possible to use serverless-kubeless with dotnetcore especially 3.1?
- Is it supports kubernetes deployment annotations like ingress? HOT 4
- kubeless-config not found
- Autoscaling function deployment in serverless-kubeless (HPA)
- Is it possible to specify get parameters in the http mapping
- When deploying kubeless throws: spec.template.spec.containers[0].image: Required value
- Unable to find kube config path on windows
- bitnami-kubernetes user will be removed from NPM
- runtime nodejs16.x is not supported HOT 1
- kubeless quick-start guide giving error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-kubeless.