OpenFunction is a cloud-native open source FaaS (Function as a Service) platform aiming to enable users to focus on their business logic without worrying about the underlying runtime environment and infrastructure. Users only need to submit business-related source code in the form of functions.
OpenFunction features but not limited to the following:

The current version of OpenFunction requires that you have a Kubernetes cluster with version >=1.18.6.
In addition, you need to deploy several dependencies for the OpenFunction Builder and Serving.
You can refer to the Installation Guide to setup OpenFunction Builder and Serving.
You need to install at least one of the following options for builders:
You need to install at least one of the following options for the serving component:
The core function of OpenFunction is to enable users to develop, run, and manage business applications as execution units of code functions. OpenFunction implements the following custom resource definitions (CRDs):
Function, defines a function.Builder, defines a function builder.Serving, defines a function workload.You can install the OpenFunction platform by the following command:
kubectl apply -f config/bundle.yaml
Note: When using non-default namespaces, make sure that the ClusterRoleBinding in the namespace is adapted.
If you have already installed the OpenFunction platform, follow the steps below to run a sample function.
Creating a secret
In order to access your container registry, you need to create a secret. You can create this secret by editing the username and password fields in config/samples/registry-account.yaml, and then apply it.
kubectl apply -f config/samples/registry-account.yaml
Creating functions
For sample function below, modify the spec.image field in config/samples/function-sample.yaml to your own container registry address:
apiVersion: core.openfunction.io/v1alpha1
kind: Function
metadata:
name: function-sample
spec:
image: "<your registry name>/sample-go-func:latest"
When having poor network connectivity to GitHub/Googleapis, follow these changes:
spec.builder: "openfunction/buildpacks-builder:v1"
Use the following command to create this Function:
kubectl apply -f config/samples/function-sample.yaml
Result observation
You can observe the process of a function with the following command:
kubectl get functions.core.openfunction.io
NAME AGE
function-sample 5s
You can also observe the process of a builder in the Tekton Dashboard.
Finally, you can observe the final state of the function workload in the Serving:
kubectl get servings.core.openfunction.io
NAME AGE
function-sample-serving 15s
You can now find out the service entry of the function with the following command:
kubectl get ksvc
NAME URL LATESTCREATED LATESTREADY READY REASON
function-sample-serving-ksvc http://function-sample-serving-ksvc.default.<external-ip>.xip.io function-sample-serving-ksvc-00001 function-sample-serving-ksvc-00001 True
Or get the service address directly with the following command:
where<external-ip>indicates the external address of your gateway service
kubectl get ksvc function-sample-serving-ksvc -o jsonpath={.status.url}
http://function-sample-serving-ksvc.default.<external-ip>.xip.io
Access the above service address via commands such as curl:
curl http://function-sample-serving-ksvc.default.<external-ip>.xip.io
Hello, World!
You can uninstall the components of OpenFunction by executing the following command:
kubectl delete -f config/bundle.yaml
You can get help on developing this project by visiting Development Guide.
Here you can find OpenFunction roadmap.
Content type
Image
Digest
Size
20.7 MB
Last updated
over 4 years ago
docker pull zephyrfish/openfunction