openfaas / golang-http-template

Golang templates for OpenFaaS using HTTP extensions
https://www.openfaas.com/
MIT License
106 stars 57 forks source link

Feature: Add Busybox Binary Version #50

Closed brianwyka closed 3 years ago

brianwyka commented 3 years ago

My actions before raising this issue

Requesting a new feature which allows for a busybox:glibc based docker image. Here is one that I have come up with: https://github.com/brianwyka/openfaas-templates

The reasons for using busybox:glibc are defined in the README.md, but here is a summary:

The template also allows for binary executables to be copied to the function into a bin directory, for the golang function handler to call using go exec.

The busybox:glibc image is essentially the same size (just as small) as alpine image as well.

brianwyka commented 3 years ago

@alexellis, do you see this as a reasonable addition? I was going to settle for using this as a custom template in OpenFaaS community cluster, but I received an error saying that custom templates are not allowed.

https://github.com/openfaas/openfaas-cloud/blob/cca5c90eeab285f7af229389ff8f219deb6c72c7/git-tar/function/handler.go#L111-L120

Since I am unable to update the gateway config, I'm seeing this as the only alternative... https://github.com/openfaas/openfaas-cloud/blob/master/gateway_config.yml#L11

alexellis commented 3 years ago

Are you not compiling a static binary? Or do you need CGO?

My advice to you is still the same as a couple of weeks ago. Host your own openfaas on managed Kubernetes or with faasd on a single VM.

We have plenty of tutorials on how to do that.

I'll close the issue as I can't see this as benefitting the broader community at present. You can use your own custom template on your own deployment on OpenFaaS.