faas-cli
faas-cli copied to clipboard
Remote build command using the Function Builder API
This is a proposal for a remote build command using the Function Builder API, plus an SDK struct that can be vendored into a Go API / microservice to perform builds with the Function Builder API that OpenFaaS Pro offers.
https://docs.openfaas.com/openfaas-pro/builder/
Expected Behaviour
faas-cli publish --remote /faas-cli pro-build?
kubectl port-forward \
-n openfaas \
svc/pro-builder 8081:8080
kubectl get secret \
-n openfaas payload-secret -o jsonpath='{.data.payload-secret}' \
| base64 --decode \
> builder-payload-secret.txt
faas-cli pro-build \
-f stack.yml
--filter hello-world \
--builder-url http://127.0.0.1:8081 \
--build-token-file builder-payload-secret
Plus some kind of SDK:
imageRef, err:= sdk.RemoteBuild("./handler", "golang-middleware", "127.0.0.1:8081`, buildToken)
Current Behaviour
We have different code examples, but they're relatively complex and involve quite a few steps. Can we make it simpler to get started?
https://github.com/openfaas/function-builder-examples
Why do you need this?
I've seen interest in the Function Builder API from low-code companies or SaaS companies and want to make it more accessible for them to get started and try it out.