Description
Hi, community!
I'd like to propose a discussion about supporting openfunction serverless framework
1. Background:
OpenFunction is a cloud-native open source FaaS (Function as a Service) platform aiming to let you focus on your business logic without having to maintain the underlying runtime environment and infrastructure.
1.1 OpenFunction features include:
- Cloud agnostic and decoupled with cloud providers' BaaS
- Pluggable architecture that allows multiple function runtimes
- Support both sync and async functions
- Unique async functions support that can consume events directly from event sources
- Support generating OCI-Compliant container images directly from function source code.
- Flexible autoscaling between 0 and N
- Advanced async function autoscaling based on event sources' specific metrics
- Simplified BaaS integration for both sync and async functions by introducing Dapr
- Advanced function ingress & traffic management powered by K8s Gateway API (In Progress)
- Flexible and easy-to-use events management framework
2. Implementation design
2.1 Objectives
Supports using functions in OpenFunction as routing "upstream" via plugins to enable access to Faas functions.
2.2 name
The plugin is named openfunction, and the priority is -1902, ranking after openwhisk
2.3 Test Environment
Prepare the kubernetes environment, download OFN, the CLI of openfunction and execute the following command
“ofn install --all”
Then run openfunction samples according to the official documentation.
2.4 Authentication
At present, openfunction provides two function entries, one is advanced function ingress & Traffic Management powered by k8s gateway API (in progress) which has many authentication methods vary from different implementations. The other is the default gateway kourier(https://github.com/knative-sandbox/net-kourier) that supports external auth.
Therefore, I think basic auth can be a default authentication method for most of k8s gateways.
2.5 parameters
- function_Uri
- ssl_verify
- service_token Description: By using basic auth , the token format is 'xx:xx'.Since openfunction does not require authentication, it is optional.
- timeout
- keepalive
- keepalive_timeout
- keepalive_pool
2.6 example
curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"plugins": {
"openfunction": {
"function_uri": "http://localhost:30585/default/function-sample/world",
"service_token": “foo:foo123”
}
},
"uri": "/gohello"
}'
POST http://localhost:30585/default/function-sample/world
Authentication: Basic xxxxx
{"payload":"Hello, world!"}
I would like to hear everyone's comments. Thanks!
Description
Hi, community!
I'd like to propose a discussion about supporting openfunction serverless framework
1. Background:
OpenFunction is a cloud-native open source FaaS (Function as a Service) platform aiming to let you focus on your business logic without having to maintain the underlying runtime environment and infrastructure.
1.1 OpenFunction features include:
2. Implementation design
2.1 Objectives
Supports using functions in OpenFunction as routing "upstream" via plugins to enable access to Faas functions.
2.2 name
The plugin is named openfunction, and the priority is -1902, ranking after openwhisk
2.3 Test Environment
Prepare the kubernetes environment, download OFN, the CLI of openfunction and execute the following command
“ofn install --all”
Then run openfunction samples according to the official documentation.
2.4 Authentication
At present, openfunction provides two function entries, one is advanced function ingress & Traffic Management powered by k8s gateway API (in progress) which has many authentication methods vary from different implementations. The other is the default gateway kourier(https://github.com/knative-sandbox/net-kourier) that supports external auth.
Therefore, I think basic auth can be a default authentication method for most of k8s gateways.
2.5 parameters
2.6 example
I would like to hear everyone's comments. Thanks!