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

Allow configuration of invoke URL pattern via environment variables #1400

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

riconnon
Copy link
Contributor

  • Link to issue this resolves

  • What I did

This allows for an Fn server to customize the path of the invoke URLs it handles

  • How I did it

There are two new environment variables for configuration:
FN_INVOKE_GROUP represents the static prefix of the invoke endpoints
FN_INVOKE_TEMPLATE represents the URL path and should include :fn_id to represent the function ID

  • How to verify it

Run an Fn server with FN_INVOKE_GROUP=/runthefunction and FN_INVOKE_TEMPLATE=/:fn_id/prettyplease
Deploy a function.
Run curl http://127.0.0.1:8080/runthefunction/<function_id>/prettyplease

  • One line description for the changelog

Allow configuration of invoke URL pattern via environment variables

  • One moving picture involving robots (not mandatory but encouraged)

@riconnon riconnon force-pushed the feature/invoke_url_template branch from d87897a to 6690cb8 Compare February 11, 2019 15:51
@riconnon riconnon force-pushed the feature/invoke_url_template branch 2 times, most recently from 4d0f969 to 5e82eaa Compare February 11, 2019 16:32
@riconnon riconnon force-pushed the feature/invoke_url_template branch from ab3c0f2 to 5e82eaa Compare February 11, 2019 16:38
@rdallman
Copy link
Contributor

hmm. we have methods to add endpoints to the server itself and we have handlers (the invoke handler which uses the same var), so while this solves the problem I'm not sure we need the additional configurations and code and this could be a one liner in the configuration of fn?

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

Successfully merging this pull request may close these issues.

2 participants