kubeless
kubeless copied to clipboard
Should include /etc/services
Is this a BUG REPORT or FEATURE REQUEST?: Could be either.
What happened: socket.getservbyname("ssh","tcp") fails in functions giving an exception.
What you expected to happen: I expect to work, and return 22. How to reproduce it (as minimally and precisely as possible): import socket socket.getservbyname("ssh", "tcp") Anything else we need to know?: Probably /etc/services is missing
Environment:
- Kubernetes version (use
kubectl version
): - Kubeless version (use
kubeless version
): 1.0.6 - Cloud provider or physical cluster: Physical cluster running under VMWare.
Hi @Alan-R, I am not sure why you would need SSH for a Kubeless function? Note that if you need a shell you can still exec within the pod running kubectl exec <pod> <command>
.
Also, the Dockerfile is here: https://github.com/kubeless/runtimes/tree/master/stable/nodejs
You can fork it and include anything you want in the base image.
If you want to connect to a given service without someone else's library, you need to know the port number. The correct way is to effectively use /etc/services. The alternative is to hard-wire it- which is inelegant and not the recommended way to write network services. "ssh" was just a simple example. You asked for an example. I gave one. In our particular case, we're managing a very large network - and there are a variety of network-related functions we might want to do using kubeless.
Typically, forking someone else's software leads to support problems. And, starting from your Dockerfile is probably not the most supportable way to do that - even if it's what has to be done.
Got it, if it's just that file, it should be lightweight. Do you mind sending a PR adding it? If it doesn't increase the size of the image too much we can include it in the official runtimes.