Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application API requests are handled by the function container #5

Open
imikushin opened this issue Aug 14, 2018 · 2 comments
Open

Application API requests are handled by the function container #5

imikushin opened this issue Aug 14, 2018 · 2 comments

Comments

@imikushin
Copy link
Member

imikushin commented Aug 14, 2018

  • function wrapper parses the request according to Content-Type header
    • can be json, yaml, text, binary
  • function wrapper injects secrets into the function invocation context
    • secret names are provided in SECRETS env var
    • Kubernetes secrets (file-system based) are used to get the secret data
  • function wrapper injects request metadata (method, URI, headers) into the function invocation context
  • function wrapper formats the response according to Accept header
    • sets Content-Type in the response
    • uses application/json by default
  • function wrapper enforces invocation timeout set in TIMEOUT env var
    • no value or 0 means no timeout
@imikushin
Copy link
Member Author

imikushin commented Aug 14, 2018

To make running a function locally easier for the user, we should consider how to make secrets compatible with Docker secrets: https://docs.docker.com/engine/swarm/secrets/

Looks like this can be achieved pretty easily by using the same file-system directories (tunable for both Docker and Kubernetes). I'd like for the user to just run their function containers locally with a simple command like

docker service create --name=my-function --secret=my-secret me/my-function:latest

@imikushin
Copy link
Member Author

Also, let's print captured function server logs to funky's stderr/stdout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant