diff --git a/README.md b/README.md
index b987c886..88e168fc 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
# OpenFunction Website
-
+
[](https://app.netlify.com/sites/openfunction-dev/deploys)
-openfunction.dev is OpenFunction's website which is built with [Hugo](https://gohugo.io/) and [Hugo template Docsy](https://github.com/google/docsy).
+openfunction.dev is OpenFunction's website which is built with [Hugo](https://gohugo.io/) and [Hugo template Docsy](https://github.com/google/docsy).
## Contribute
@@ -50,4 +50,4 @@ Open a [pull request (PR)](https://help.github.com/en/desktop/contributing-to-pr
```bash
git commit -s -m "xxx"
-```
\ No newline at end of file
+```
diff --git a/content/en/_index.html b/content/en/_index.html
index 863ae0cb..dcd4e8e5 100644
--- a/content/en/_index.html
+++ b/content/en/_index.html
@@ -23,7 +23,7 @@
{{% blocks/section color="white" %}}
-
+
diff --git a/content/en/blog/releases/release_v1.0.0.md b/content/en/blog/releases/release_v1.0.0.md
index 6a38ee99..1e362839 100644
--- a/content/en/blog/releases/release_v1.0.0.md
+++ b/content/en/blog/releases/release_v1.0.0.md
@@ -6,7 +6,7 @@ weight: 92
---
-[OpenFunction](https://github.com/OpenFunction/OpenFunction) is a cloud-native open-source FaaS (Function as a Service) platform aiming to let you focus on your business logic only. Today, we are thrilled to announce the general availability of OpenFunction 1.1.0.
+[OpenFunction](https://github.com/OpenFunction/OpenFunction) is a cloud-native open-source FaaS (Function as a Service) platform aiming to let you focus on your business logic only. Today, we are thrilled to announce the general availability of OpenFunction 1.0.0.
In this update, we have continued our commitment to providing developers with more flexible and powerful tools, and have added some new feature. This release integrates WasmEdge to support Wasm functions; we have also enhanced the CI/CD functionality of OpenFunction to provide relatively complete end-to-end CI/CD functionality; and we have added the ability to build an image of a function or application directly from local code in this release, making it easier for developers to publish and deploy their code.
diff --git a/content/en/blog/releases/release_v1.1.0.md b/content/en/blog/releases/release_v1.1.0.md
new file mode 100644
index 00000000..42c567b3
--- /dev/null
+++ b/content/en/blog/releases/release_v1.1.0.md
@@ -0,0 +1,100 @@
+---
+title: "Announcing OpenFunction 1.1.0: Support Dapr State Management and Refactor Function Triggers"
+linkTitle: "Release v1.1.0"
+date: 2023-06-12
+weight: 92
+
+---
+
+OpenFunction is a cloud-native open-source FaaS (Function as a Service) platform aiming to let you focus on your business logic only. Today, we are thrilled to announce the general availability of OpenFunction 1.1.0.
+
+In this release, we have added the v1beta2 API and support Dapr State management. In addition, we enhanced some features and fixed bugs, making OpenFunction more stable and easy to use.
+
+The following introduces the major updates.
+
+## Add the v1beta2 API
+
+In this release, we have added the v1beta2 API. The v1beta1 API has been deprecated and will be removed. You can learn more about the v1beta2 API from this [proposal](https://github.com/OpenFunction/OpenFunction/blob/main/docs/proposals/20230330-support-dapr-state-management.md).
+
+### Support Dapr state management
+
+Previously, OpenFunction supports the pub/sub and bindings building blocks, and state management is a building block that is useful for stateful functions. With the use of state store components, you can build functions with persistent state, allowing them to save and restore their own states.
+
+You can define state stores in Function CR, and OpenFunction will manage the corresponding Dapr components.
+
+The functions can use the encapsulated state management API of Dapr to save, read, and query key/value pairs in the defined state storage.
+
+## Refactor function triggers
+
+Previously, we use `runtime: knative` and `runtime: async` to distinguish sync and async functions, which is sort of difficult. Actually the difference between sync and async functions lies in the trigger type:
+
+- Sync functions are triggered by `HTTP` events, which are defined by specifying `runtime: knative`.
+
+- Async functions are triggered by events from components of `Dapr bindings` or `Dapr pubsub`. `runtime: async` and `inputs` have to be used together to specify triggers for async functions.
+
+Now we use `triggers` to replace `runtime` and `inputs`.
+
+`HTTP Trigger` triggers a function with an HTTP request. You can define an `HTTP Trigger` for a function like this:
+
+```yaml
+apiVersion: core.openfunction.io/v1beta2
+kind: Function
+metadata:
+ name: function-sample
+spec:
+ serving:
+ triggers:
+ http:
+ port: 8080
+ route:
+ rules:
+ - matches:
+ - path:
+ type: PathPrefix
+ value: /echo
+```
+
+`Dapr Trigger` triggers a function with events from `Dapr bindings` or `Dapr pubsub`. You can define a function with `Dapr Trigger` like this:
+
+```yaml
+apiVersion: core.openfunction.io/v1beta2
+kind: Function
+metadata:
+ name: logs-async-handler
+ namespace: default
+spec:
+ serving:
+ bindings:
+ kafka-receiver:
+ metadata:
+ - name: brokers
+ value: kafka-server-kafka-brokers:9092
+ - name: authRequired
+ value: "false"
+ - name: publishTopic
+ value: logs
+ - name: topics
+ value: logs
+ - name: consumerGroup
+ value: logs-handler
+ type: bindings.kafka
+ version: v1
+ triggers:
+ dapr:
+ - name: kafka-receiver
+ type: bindings.kafka
+```
+
+## Other enhancements
+
+- Delete the `lastTransitionTime` field from the gateway status to prevent frequent triggering of reconcile.
+- Allow to set scopes when creating Dapr components.
+- Support the ability to set cache images to improve build performance when using OpenFunction strategies.
+- Support the ability to set bash images of OpenFunction strategies.
+
+These are the main feature changes in OpenFunction v1.1.0 and we would like to thank all contributors for your contributions. If you are looking for an efficient and flexible cloud-native function development platform, OpenFunction v1.1.0 is the perfect choice for you.
+
+For more details and documentation, please visit our website and GitHub repo.
+
+- [Official Website](https://openfunction.dev/): https://openfunction.dev/
+- [Github](https://github.com/OpenFunction/OpenFunction/releases/tag/v1.1.0):https://github.com/OpenFunction/OpenFunction/releases/tag/v1.1.0
\ No newline at end of file
diff --git a/content/en/blog/releases/release_v1.2.0.md b/content/en/blog/releases/release_v1.2.0.md
new file mode 100644
index 00000000..6b0388b0
--- /dev/null
+++ b/content/en/blog/releases/release_v1.2.0.md
@@ -0,0 +1,43 @@
+---
+title: "OpenFunction 1.2.0: integrating KEDA http-addon as a synchronous function runtime"
+linkTitle: "Release v1.2.0"
+date: 2023-11-01
+weight: 92
+
+---
+
+[OpenFunction](https://github.com/OpenFunction/OpenFunction) is an open-source cloud-native FaaS (Function as a Service) platform designed to help developers focus on their business logic. We are thrilled to announce another important update for OpenFunction, the release of version v1.2.0!
+
+In this update, we continue to strive to provide developers with more flexible and powerful tools, and have added some new features. This version integrates KEDA http-addon as a synchronous function runtime, supports adding environment variables when enabling SkyWalking tracing, and supports recording build time. Additionally, several components have been upgraded and multiple bugs have been fixed.
+
+Here are the main highlights of this version update:
+
+## integrating KEDA http-addon as a synchronous function runtime
+
+KEDA http-addon is an additional component of KEDA that automatically scales HTTP servers based on changes in HTTP traffic, including scaling from zero to handle traffic and scaling down to zero when there is no traffic.
+
+The working principle of KEDA http-addon is that it creates a component called Interceptor in the Kubernetes cluster to receive all HTTP requests and forward them to the target application. At the same time, it reports the length of the request queue to a component called External Scaler, which triggers KEDA's automatic scaling mechanism. This allows your HTTP application to dynamically adjust the number of replicas based on the actual traffic demand.
+
+In OpenFunction version v1.2.0, we have integrated KEDA http-addon as an option for synchronous function runtime. This means that you can use OpenFunction to create and manage HTTP-based functions and leverage the capabilities of KEDA http-addon for efficient and flexible elastic scaling. To deploy and run your HTTP functions, you simply need to specify the value of `serving.triggers[*].http.engine` as "keda" when creating the Function resource and configure the relevant parameters of `keda.httpScaledObject` in `serving.scaleOptions`.
+
+## Support for recording events when the states of Function, Builder, and Serving change
+
+Events are an important resource type in Kubernetes that can record important or interesting occurrences within a cluster. Events can help users and developers understand changes in the state of resources within the cluster and handle any abnormalities accordingly.
+
+In OpenFunction version v1.2.0, we support recording events when the states of Function, Builder, and Serving change. This allows you to gain more information about what happens during the function building and running processes by reviewing the events. For example, you can see events such as the start, end, or failure of function building, as well as events related to the creation, update, or deletion of function runtimes.
+
+## Other improvements and optimizations
+
+In addition to the major changes mentioned above, this version also includes the following modifications and enhancements:
+
+* Upgraded KEDA to v2.10.1 and HPA (Horizontal Pod Autoscaler) API version to v2, improving stability and compatibility.
+* Added support for recording build time, allowing you to track the duration of function builds.
+* Adjusted the CI (Continuous Integration) process and fixed some minor issues.
+* Fixed a bug in the keda http-addon runtime that caused functions to not run properly.
+* Upgraded several components in the charts, including keda, dapr, and contour, to ensure the use of the latest versions and features.
+* These are the main functional changes in OpenFunction v1.2.0. We would like to express our sincere gratitude to all contributors for their participation and contributions.
+
+To learn more about OpenFunction and this version update, please visit our official website and GitHub page.
+
+- [Official Website](https://openfunction.dev/):https://openfunction.dev/
+- [Github](https://github.com/OpenFunction/OpenFunction/releases/tag/v1.2.0):https://github.com/OpenFunction/OpenFunction/releases/tag/v1.2.0
\ No newline at end of file
diff --git a/content/en/docs/_index.md b/content/en/docs/_index.md
index 69aa24a3..88af2f02 100644
--- a/content/en/docs/_index.md
+++ b/content/en/docs/_index.md
@@ -1,5 +1,5 @@
---
-title: "v1.0 (preview)"
+title: "v1.2 (latest)"
linkTitle: "Docs"
weight: 20
---
diff --git a/content/en/docs/best-practices/interact-with-dapr-output-binding.md b/content/en/docs/best-practices/interact-with-dapr-output-binding.md
index ef479422..19887033 100644
--- a/content/en/docs/best-practices/interact-with-dapr-output-binding.md
+++ b/content/en/docs/best-practices/interact-with-dapr-output-binding.md
@@ -40,7 +40,7 @@ The following diagram illustrates the relationship between these functions.
namespace: default
spec:
kafka:
- version: 3.1.0
+ version: 3.3.1
replicas: 1
listeners:
- name: plain
@@ -114,7 +114,7 @@ The following diagram illustrates the relationship between these functions.
1. Use the following example YAML file to create a manifest `kafka-input.yaml` and modify the value of `spec.image` to set your own image registry address. The field `spec.serving.inputs` defines an input source that points to a Dapr component of the Kafka server. It means that the `kafka-input` function will be driven by events in the topic `sample-topic` of the Kafka server.
```yaml
- apiVersion: core.openfunction.io/v1beta1
+ apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: kafka-input
@@ -133,15 +133,19 @@ The following diagram illustrates the relationship between these functions.
sourceSubPath: "functions/async/bindings/kafka-input"
revision: "main"
serving:
- runtime: async
scaleOptions:
minReplicas: 0
maxReplicas: 10
keda:
+ triggers:
+ - type: kafka
+ metadata:
+ topic: sample-topic
+ bootstrapServers: kafka-server-kafka-brokers.default.svc:9092
+ consumerGroup: kafka-input
+ lagThreshold: "20"
scaledObject:
pollingInterval: 15
- minReplicaCount: 0
- maxReplicaCount: 10
cooldownPeriod: 60
advanced:
horizontalPodAutoscalerConfig:
@@ -154,16 +158,11 @@ The following diagram illustrates the relationship between these functions.
periodSeconds: 15
scaleUp:
stabilizationWindowSeconds: 0
+
triggers:
- - type: kafka
- metadata:
- topic: sample-topic
- bootstrapServers: kafka-server-kafka-brokers.default.svc:9092
- consumerGroup: kafka-input
- lagThreshold: "20"
- inputs:
- - name: greeting
- component: target-topic
+ dapr:
+ - name: target-topic
+ type: bindings.kafka
bindings:
target-topic:
type: bindings.kafka
@@ -192,26 +191,17 @@ The following diagram illustrates the relationship between these functions.
```
3. Use the following example YAML file to create a manifest `function-front.yaml` and modify the value of `spec.image` to set your own image registry address.
-
- ```yaml
- apiVersion: core.openfunction.io/v1beta1
+
+```yaml
+ apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-front
- annotations:
- plugins: |
- pre:
- - plugin-custom
- - plugin-example
- post:
- - plugin-custom
- - plugin-example
spec:
version: "v1.0.0"
image: "/sample-knative-dapr:latest"
imageCredentials:
name: push-secret
- port: 8080 # Default to 8080
build:
builder: openfunction/builder-go:latest
env:
@@ -222,14 +212,20 @@ The following diagram illustrates the relationship between these functions.
sourceSubPath: "functions/knative/with-output-binding"
revision: "main"
serving:
+ hooks:
+ pre:
+ - plugin-custom
+ - plugin-example
+ post:
+ - plugin-example
+ - plugin-custom
scaleOptions:
minReplicas: 0
maxReplicas: 5
- runtime: knative
outputs:
- - name: target
- component: kafka-server
- operation: "create"
+ - dapr:
+ name: kafka-server
+ operation: "create"
bindings:
kafka-server:
type: bindings.kafka
@@ -249,8 +245,8 @@ The following diagram illustrates the relationship between these functions.
containers:
- name: function
imagePullPolicy: Always
- ```
-
+ ```
+
{{% alert title="Note" color="success" %}}
`metadata.plugins.pre` defines the order of plugins that need to be called before the user function is executed. `metadata.plugins.post` defines the order of plugins that need to be called after the user function is executed. For more information about the logic of these two plugins and the effect of the plugins after they are executed, see [Plugin mechanism](https://github.com/OpenFunction/samples/blob/main/functions-framework/README.md#plugin-mechanism).
diff --git a/content/en/docs/best-practices/logs-handler-function.md b/content/en/docs/best-practices/logs-handler-function.md
index de4f94f4..e07a5ed4 100644
--- a/content/en/docs/best-practices/logs-handler-function.md
+++ b/content/en/docs/best-practices/logs-handler-function.md
@@ -38,7 +38,7 @@ This document uses an asynchronous function to analyze the log stream in Kafka t
namespace: default
spec:
kafka:
- version: 3.1.0
+ version: 3.3.1
replicas: 1
listeners:
- name: plain
@@ -111,87 +111,89 @@ This document uses an asynchronous function to analyze the log stream in Kafka t
1. Use the following example YAML file to create a manifest `logs-handler-function.yaml` and modify the value of `spec.image` to set your own image registry address.
- ```yaml
- apiVersion: core.openfunction.io/v1beta1
+```yaml
+ apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: logs-async-handler
+ namespace: default
spec:
- version: "v2.0.0"
- image: /logs-async-handler:latest
- imageCredentials:
- name: push-secret
build:
builder: openfunction/builder-go:latest
env:
- FUNC_NAME: "LogsHandler"
FUNC_CLEAR_SOURCE: "true"
- # Use FUNC_GOPROXY to set the goproxy
- # FUNC_GOPROXY: "https://goproxy.cn"
+ FUNC_NAME: LogsHandler
srcRepo:
- url: "https://github.com/OpenFunction/samples.git"
- sourceSubPath: "functions/async/logs-handler-function/"
- revision: "main"
+ revision: main
+ sourceSubPath: functions/async/logs-handler-function/
+ url: https://github.com/OpenFunction/samples.git
+ image: openfunctiondev/logs-async-handler:v1
+ imageCredentials:
+ name: push-secret
serving:
- runtime: "async"
- scaleOptions:
- keda:
- scaledObject:
- pollingInterval: 15
- minReplicaCount: 0
- maxReplicaCount: 10
- cooldownPeriod: 60
- advanced:
- horizontalPodAutoscalerConfig:
- behavior:
- scaleDown:
- stabilizationWindowSeconds: 45
- policies:
- - type: Percent
- value: 50
- periodSeconds: 15
- scaleUp:
- stabilizationWindowSeconds: 0
- triggers:
- - type: kafka
- metadata:
- topic: logs
- bootstrapServers: kafka-server-kafka-brokers.default.svc.cluster.local:9092
- consumerGroup: logs-handler
- lagThreshold: "20"
- template:
- containers:
- - name: function
- imagePullPolicy: Always
- inputs:
- - name: kafka
- component: kafka-receiver
- outputs:
- - name: notify
- component: notification-manager
- operation: "post"
bindings:
kafka-receiver:
- type: bindings.kafka
- version: v1
metadata:
- name: brokers
- value: "kafka-server-kafka-brokers:9092"
+ value: kafka-server-kafka-brokers:9092
- name: authRequired
value: "false"
- name: publishTopic
- value: "logs"
+ value: logs
- name: topics
- value: "logs"
+ value: logs
- name: consumerGroup
- value: "logs-handler"
- notification-manager:
- type: bindings.http
+ value: logs-handler
+ type: bindings.kafka
version: v1
+ notification-manager:
metadata:
- name: url
value: http://notification-manager-svc.kubesphere-monitoring-system.svc.cluster.local:19093/api/v2/alerts
- ```
+ type: bindings.http
+ version: v1
+ outputs:
+ - dapr:
+ name: notification-manager
+ operation: post
+ type: bindings.http
+ scaleOptions:
+ keda:
+ scaledObject:
+ advanced:
+ horizontalPodAutoscalerConfig:
+ behavior:
+ scaleDown:
+ policies:
+ - periodSeconds: 15
+ type: Percent
+ value: 50
+ stabilizationWindowSeconds: 45
+ scaleUp:
+ stabilizationWindowSeconds: 0
+ cooldownPeriod: 60
+ pollingInterval: 15
+ triggers:
+ - metadata:
+ bootstrapServers: kafka-server-kafka-brokers.default.svc.cluster.local:9092
+ consumerGroup: logs-handler
+ lagThreshold: "20"
+ topic: logs
+ type: kafka
+ maxReplicas: 10
+ minReplicas: 0
+ template:
+ containers:
+ - imagePullPolicy: IfNotPresent
+ name: function
+ triggers:
+ dapr:
+ - name: kafka-receiver
+ type: bindings.kafka
+ workloadType: Deployment
+ version: v2.0.0
+ workloadRuntime: OCIContainer
+```
2. Run the following command to create the function `logs-async-handler`.
diff --git a/content/en/docs/best-practices/skywalking-solution-for-openfunction.md b/content/en/docs/best-practices/skywalking-solution-for-openfunction.md
index 389ae1e6..5ece91ef 100644
--- a/content/en/docs/best-practices/skywalking-solution-for-openfunction.md
+++ b/content/en/docs/best-practices/skywalking-solution-for-openfunction.md
@@ -72,7 +72,7 @@ This document uses `skywalking-oap.default:11800` as an example of the skywalkin
```yaml
data:
- plugins.tracing: |
+ tracing: |
enabled: true
provider:
name: "skywalking"
@@ -94,20 +94,21 @@ To enable tracing configuration in the function-level, add the field `plugins.tr
```yaml
metadata:
name: tracing-function
- annotations:
- plugins.tracing: |
- enabled: true
- provider:
- name: "skywalking"
- oapServer: "skywalking-oap:11800"
- tags:
- func: tracing-function
- layer: faas
- tag1: value1
- tag2: value2
- baggage:
- key: "key1"
- value: "value1"
+spec:
+ serving:
+ tracing:
+ enabled: true
+ provider:
+ name: "skywalking"
+ oapServer: "skywalking-oap:11800"
+ tags:
+ func: tracing-function
+ layer: faas
+ tag1: value1
+ tag2: value2
+ baggage:
+ key: "key1"
+ value: "value1"
```
It is recommended that you use the global tracing configuration, or you have to add function-level tracing configuration for every function you create.
diff --git a/content/en/docs/concepts/Events/event-bus-and-trigger.md b/content/en/docs/concepts/Events/event-bus-and-trigger.md
index 5d7c3ee6..229023c4 100644
--- a/content/en/docs/concepts/Events/event-bus-and-trigger.md
+++ b/content/en/docs/concepts/Events/event-bus-and-trigger.md
@@ -27,16 +27,14 @@ helm install stan nats/stan --set stan.nats.url=nats://nats:4222
1. Use the following content to create a configuration file (for example, `openfuncasync-function.yaml`) for the target function, which is triggered by the Trigger CRD and prints the received message.
```yaml
- apiVersion: core.openfunction.io/v1beta1
+ apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: trigger-target
spec:
version: "v1.0.0"
image: openfunctiondev/v1beta1-trigger-target:latest
- port: 8080
serving:
- runtime: "async"
scaleOptions:
keda:
scaledObject:
@@ -44,18 +42,18 @@ helm install stan nats/stan --set stan.nats.url=nats://nats:4222
minReplicaCount: 0
maxReplicaCount: 10
cooldownPeriod: 30
+ triggers:
+ - type: stan
+ metadata:
+ natsServerMonitoringEndpoint: "stan.default.svc.cluster.local:8222"
+ queueGroup: "grp1"
+ durableName: "ImDurable"
+ subject: "metrics"
+ lagThreshold: "10"
triggers:
- - type: stan
- metadata:
- natsServerMonitoringEndpoint: "stan.default.svc.cluster.local:8222"
- queueGroup: "grp1"
- durableName: "ImDurable"
- subject: "metrics"
- lagThreshold: "10"
- inputs:
- - name: autoscaling-pubsub
- component: eventbus
- topic: metrics
+ dapr:
+ - name: eventbus
+ topic: metrics
pubsub:
eventbus:
type: pubsub.natsstreaming
@@ -233,7 +231,7 @@ helm install stan nats/stan --set stan.nats.url=nats://nats:4222
1. Use the following content to create an event producer configuration file (for example, `events-producer.yaml`).
```yaml
- apiVersion: core.openfunction.io/v1beta1
+ apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: events-producer
@@ -245,14 +243,14 @@ helm install stan nats/stan --set stan.nats.url=nats://nats:4222
containers:
- name: function
imagePullPolicy: Always
- runtime: "async"
- inputs:
- - name: cron
- component: cron
+ triggers:
+ dapr:
+ - name: cron
+ type: bindings.cron
outputs:
- - name: target
- component: kafka-server
- operation: "create"
+ - dapr:
+ name: kafka-server
+ operation: "create"
bindings:
cron:
type: bindings.cron
diff --git a/content/en/docs/concepts/Events/event-source.md b/content/en/docs/concepts/Events/event-source.md
index 19824c85..ffd1f929 100644
--- a/content/en/docs/concepts/Events/event-source.md
+++ b/content/en/docs/concepts/Events/event-source.md
@@ -14,20 +14,21 @@ In this example, an EventSource is defined for synchronous invocation to use the
Use the following content to create a function as the EventSource Sink. For more information about how to create a function, see [Create sync functions](../../../getting-started/quickstarts/sync-functions).
```yaml
-apiVersion: core.openfunction.io/v1beta1
+apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: sink
spec:
version: "v1.0.0"
image: "openfunction/sink-sample:latest"
- port: 8080
serving:
- runtime: "knative"
template:
containers:
- name: function
imagePullPolicy: Always
+ triggers:
+ http:
+ port: 8080
```
After the function is created, run the following command to get the URL of the function.
@@ -63,7 +64,7 @@ sink Skipped Running serving-4x5wh https://openfunctio
namespace: default
spec:
kafka:
- version: 3.1.0
+ version: 3.3.1
replicas: 1
listeners:
- name: plain
diff --git a/content/en/docs/concepts/baas_integration.md b/content/en/docs/concepts/baas_integration.md
index bc37a6cf..ccf9e3af 100644
--- a/content/en/docs/concepts/baas_integration.md
+++ b/content/en/docs/concepts/baas_integration.md
@@ -44,7 +44,7 @@ There're default values for both of these two flags if they're not set.
Below you can find a function example to set these two flags:
```yaml
-apiVersion: core.openfunction.io/v1beta1
+apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: cron-input-kafka-output
@@ -70,14 +70,14 @@ spec:
containers:
- name: function # DO NOT change this
imagePullPolicy: IfNotPresent
- runtime: "async"
- inputs:
- - name: cron
- component: cron
+ triggers:
+ dapr:
+ - name: cron
+ type: bindings.cron
outputs:
- - name: sample
- component: kafka-server
- operation: "create"
+ - dapr:
+ component: kafka-server
+ operation: "create"
bindings:
cron:
type: bindings.cron
diff --git a/content/en/docs/concepts/build_strategy.md b/content/en/docs/concepts/build_strategy.md
new file mode 100644
index 00000000..d8ee56b1
--- /dev/null
+++ b/content/en/docs/concepts/build_strategy.md
@@ -0,0 +1,127 @@
+---
+title: "Build Strategy"
+linkTitle: "Build Strategy"
+weight: 3120
+description:
+---
+
+Build Strategy is used to control the build process. There are two types of strategies, `ClusterBuildStrategy` and `BuildStrategy`.
+Both strategies define a group of steps necessary to control the application build process.
+
+`ClusterBuildStrategy` is cluster-wide, while `BuildStrategy` is namespaced.
+
+There are 4 built-in `ClusterBuildStrategy` in OpenFunction, you can find more details in the following sections.
+
+## openfunction
+
+The `openfunction` ClusterBuildStrategy uses [Buildpacks](https://buildpacks.io/docs/) to build function images which is the default build strategy.
+
+The following are the parameters of the `openfunction` ClusterBuildStrategy:
+
+| Name | Type | Describe |
+| --- | --- | --- |
+| RUN_IMAGE | string | Reference to a run image to use |
+| CACHE_IMAGE | string | Cache Image is a way to preserve cache layers across different builds, which can improve build performance when building functions or applications with lots of dependencies like Java functions. |
+| BASH_IMAGE | string | The bash image that the strategy used. |
+| ENV_VARS | string | Environment variables to set during _build-time_. The formate is `key1=value1,key2=value2`. |
+
+Users can set these parameters like this:
+
+```yaml
+apiVersion: core.openfunction.io/v1beta2
+kind: Function
+metadata:
+ name: logs-async-handler
+spec:
+ build:
+ shipwright:
+ params:
+ RUN_IMAGE: ""
+ ENV_VARS: ""
+```
+
+## buildah
+
+The `buildah` ClusterBuildStrategy uses [buildah](https://buildah.io/) to build application images.
+
+To use `buildah` ClusterBuildStrategy, you can define a `Function` like this:
+
+```yaml
+apiVersion: core.openfunction.io/v1beta2
+kind: Function
+metadata:
+ name: sample-go-app
+ namespace: default
+spec:
+ build:
+ builder: openfunction/buildah:v1.23.1
+ dockerfile: Dockerfile
+ shipwright:
+ strategy:
+ kind: ClusterBuildStrategy
+ name: buildah
+```
+
+The following are the parameters of the `buildah` ClusterBuildStrategy:
+
+| Name | Type | Describe | Default |
+| --- | --- | --- | --- |
+| registry-search | string | The registries for searching short name images such as `golang:latest`, separated by commas. | docker.io,quay.io |
+| registry-insecure | string | The fully-qualified name of insecure registries. An insecure registry is a registry that does not have a valid SSL certificate or only supports HTTP. |
+| registry-block | string | The registries that need to block pull access. | "" |
+
+## kaniko
+
+The `kaniko` ClusterBuildStrategy uses [kaniko](https://github.com/GoogleContainerTools/kaniko) to build application images.
+
+To use `kaniko` ClusterBuildStrategy, you can define a `Function` like this:
+
+```yaml
+apiVersion: core.openfunction.io/v1beta2
+kind: Function
+metadata:
+ name: function-kaniko
+ namespace: default
+spec:
+ build:
+ builder: openfunction/kaniko-executor:v1.7.0
+ dockerfile: Dockerfile
+ shipwright:
+ strategy:
+ kind: ClusterBuildStrategy
+ name: kaniko
+```
+
+## ko
+
+The `ko` ClusterBuildStrategy uses [ko](https://github.com/ko-build/ko) to build `Go` application images.
+
+To use `ko` ClusterBuildStrategy, you can define a `Function` like this:
+
+```yaml
+apiVersion: core.openfunction.io/v1beta2
+kind: Function
+metadata:
+ name: function-ko
+ namespace: default
+spec:
+ build:
+ builder: golang:1.17
+ dockerfile: Dockerfile
+ shipwright:
+ strategy:
+ kind: ClusterBuildStrategy
+ name: ko
+```
+
+The following are the parameters of `ko` ClusterBuildStrategy:
+
+| Name | Type | Describe | Default |
+| --- | --- | --- | --- |
+| go-flags | string | Value for the GOFLAGS environment variable. | "" |
+| ko-version | string | Version of ko, must be either 'latest', or a release name from https://github.com/google/ko/releases. | "" |
+| package-directory | string | The directory inside the context directory containing the main package. | "." |
+
+## Custom Strategy
+
+Users can customize their own strategy. To customize strategy, you can refer to [this](https://github.com/shipwright-io/build/blob/main/docs/buildstrategies.md).
\ No newline at end of file
diff --git a/content/en/docs/concepts/cicd.md b/content/en/docs/concepts/cicd.md
index 436795cd..57cb228d 100644
--- a/content/en/docs/concepts/cicd.md
+++ b/content/en/docs/concepts/cicd.md
@@ -39,7 +39,7 @@ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/revision-control
To detect source code or image changes, you'll need to add revision controller switch and params like below to a function's annotation.
```yaml
-apiVersion: core.openfunction.io/v1beta1
+apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
annotations:
diff --git a/content/en/docs/concepts/function.md b/content/en/docs/concepts/function.md
index d922901d..4330b234 100644
--- a/content/en/docs/concepts/function.md
+++ b/content/en/docs/concepts/function.md
@@ -20,7 +20,7 @@ Once a function is created, it will controll the lifecycle of `Build` and `Servi
- `Serving` can be defined without `Build`, the function will use a previously built function image for serving.
-
+
## Build
diff --git a/content/en/docs/concepts/function_build.md b/content/en/docs/concepts/function_build.md
index aeff45f5..2361b1a5 100644
--- a/content/en/docs/concepts/function_build.md
+++ b/content/en/docs/concepts/function_build.md
@@ -18,7 +18,7 @@ You can build a function image by simply adding a build section in the `Function
If there is a serving section defined as well, the function will be launched as soon as the build completes.
```yaml
-apiVersion: core.openfunction.io/v1beta1
+apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: logs-async-handler
@@ -70,7 +70,7 @@ docker push /sample-source-code:latest
Unlike defining the `spec.build.srcRepo.url` field for the git repo method, you'll need to define the `spec.build.srcRepo.bundleContainer.image` field instead.
```yaml
-apiVersion: core.openfunction.io/v1beta1
+apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: logs-async-handler
diff --git a/content/en/docs/concepts/function_io.md b/content/en/docs/concepts/function_io.md
deleted file mode 100644
index 8a4f93f1..00000000
--- a/content/en/docs/concepts/function_io.md
+++ /dev/null
@@ -1,127 +0,0 @@
----
-title: "Function Inputs and Outputs"
-linkTitle: "Function Inputs and Outputs"
-weight: 3200
-description:
----
-Functions usually have inputs and outputs.
-## Function Inputs
-
-For a sync function, the input is always the payload of the HTTP request.
-
-For an async function, the input data comes from:
-- Any [Dapr Input Binding components](https://docs.dapr.io/reference/components-reference/supported-bindings/) of the [Dapr Bindings Building Block](https://docs.dapr.io/developing-applications/building-blocks/bindings/bindings-overview/)
-- Any [Dapr Pub/sub brokers components](https://docs.dapr.io/reference/components-reference/supported-pubsub/) of the [Dapr Pub/sub Building Block](https://docs.dapr.io/developing-applications/building-blocks/pubsub/pubsub-overview/)
-
-## Function Outputs
-
-For a sync function, the output can be sent through the HTTP response.
-
-Both sync functions and async functions can send outputs to Dapr components including:
-- Any [Dapr Output Binding components](https://docs.dapr.io/reference/components-reference/supported-bindings/) of the [Dapr Bindings Building Block](https://docs.dapr.io/developing-applications/building-blocks/bindings/bindings-overview/)
-- Any [Dapr Pub/sub brokers components](https://docs.dapr.io/reference/components-reference/supported-pubsub/) of the [Dapr Pub/sub Building Block](https://docs.dapr.io/developing-applications/building-blocks/pubsub/pubsub-overview/)
-
-For example, [here](https://github.com/OpenFunction/samples/blob/main/functions/async/bindings/cron-input-kafka-output) you can find an async function with a cron input binding and a Kafka output binding:
-
-```yaml
-apiVersion: core.openfunction.io/v1beta1
-kind: Function
-metadata:
- name: cron-input-kafka-output
-spec:
- ...
- serving:
- ...
- runtime: "async"
- inputs:
- - name: cron
- component: cron
- outputs:
- - name: sample
- component: kafka-server
- operation: "create"
- bindings:
- cron:
- type: bindings.cron
- version: v1
- metadata:
- - name: schedule
- value: "@every 2s"
- kafka-server:
- type: bindings.kafka
- version: v1
- metadata:
- - name: brokers
- value: "kafka-server-kafka-brokers:9092"
- - name: topics
- value: "sample-topic"
- - name: consumerGroup
- value: "bindings-with-output"
- - name: publishTopic
- value: "sample-topic"
- - name: authRequired
- value: "false"
-```
-
-[Here](https://github.com/OpenFunction/samples/tree/main/functions/async/pubsub/subscriber) is another async function example that use a Kafka Pub/sub component as input.
-
-```yaml
-apiVersion: core.openfunction.io/v1beta1
-kind: Function
-metadata:
- name: autoscaling-subscriber
-spec:
- ...
- serving:
- ...
- runtime: "async"
- inputs:
- - name: producer
- component: kafka-server
- topic: "sample-topic"
- pubsub:
- kafka-server:
- type: pubsub.kafka
- version: v1
- metadata:
- - name: brokers
- value: "kafka-server-kafka-brokers:9092"
- - name: authRequired
- value: "false"
- - name: allowedTopics
- value: "sample-topic"
- - name: consumerID
- value: "autoscaling-subscriber"
-```
-
-Sync functions can also send output to Dapr output binding components or Pub/sub components, [here](https://github.com/OpenFunction/samples/tree/main/functions/knative/with-output-binding) is an example:
-
-```yaml
-apiVersion: core.openfunction.io/v1beta1
-kind: Function
-metadata:
- name: function-front
-spec:
- serving:
- ...
- runtime: knative
- outputs:
- - name: target
- component: kafka-server
- operation: "create"
- bindings:
- kafka-server:
- type: bindings.kafka
- version: v1
- metadata:
- - name: brokers
- value: "kafka-server-kafka-brokers:9092"
- - name: authRequired
- value: "false"
- - name: publishTopic
- value: "sample-topic"
- - name: topics
- value: "sample-topic"
- - name: consumerGroup
- value: "function-front"
-```
diff --git a/content/en/docs/concepts/function_output.md b/content/en/docs/concepts/function_output.md
new file mode 100644
index 00000000..9474c922
--- /dev/null
+++ b/content/en/docs/concepts/function_output.md
@@ -0,0 +1,78 @@
+---
+title: "Function Outputs"
+linkTitle: "Function Outputs"
+weight: 3210
+description:
+---
+
+## Function Outputs
+
+Output is a component that the function can send data to, include:
+
+- Any [Dapr Output Binding components](https://docs.dapr.io/reference/components-reference/supported-bindings/) of the [Dapr Bindings Building Block](https://docs.dapr.io/developing-applications/building-blocks/bindings/bindings-overview/)
+- Any [Dapr Pub/sub brokers components](https://docs.dapr.io/reference/components-reference/supported-pubsub/) of the [Dapr Pub/sub Building Block](https://docs.dapr.io/developing-applications/building-blocks/pubsub/pubsub-overview/)
+
+For example, [here](https://github.com/OpenFunction/samples/blob/main/functions/async/bindings/cron-input-kafka-output) you can find an async function with a cron input binding and a Kafka output binding:
+
+```yaml
+apiVersion: core.openfunction.io/v1beta2
+kind: Function
+metadata:
+ name: cron-input-kafka-output
+spec:
+ ...
+ serving:
+ ...
+ outputs:
+ - dapr:
+ name: kafka-server
+ type: bindings.kafka
+ operation: "create"
+ bindings:
+ kafka-server:
+ type: bindings.kafka
+ version: v1
+ metadata:
+ - name: brokers
+ value: "kafka-server-kafka-brokers:9092"
+ - name: topics
+ value: "sample-topic"
+ - name: consumerGroup
+ value: "bindings-with-output"
+ - name: publishTopic
+ value: "sample-topic"
+ - name: authRequired
+ value: "false"
+```
+
+[Here](https://github.com/OpenFunction/samples/tree/main/functions/async/pubsub/subscriber) is another async function example that use a Kafka Pub/sub component as input.
+
+```yaml
+apiVersion: core.openfunction.io/v1beta2
+kind: Function
+metadata:
+ name: autoscaling-subscriber
+spec:
+ ...
+ serving:
+ ...
+ runtime: "async"
+ outputs:
+ - dapr:
+ name: kafka-server
+ type: pubsub.kafka
+ topic: "sample-topic"
+ pubsub:
+ kafka-server:
+ type: pubsub.kafka
+ version: v1
+ metadata:
+ - name: brokers
+ value: "kafka-server-kafka-brokers:9092"
+ - name: authRequired
+ value: "false"
+ - name: allowedTopics
+ value: "sample-topic"
+ - name: consumerID
+ value: "autoscaling-subscriber"
+```
diff --git a/content/en/docs/concepts/function_scaling_trigger.md b/content/en/docs/concepts/function_scaling.md
similarity index 79%
rename from content/en/docs/concepts/function_scaling_trigger.md
rename to content/en/docs/concepts/function_scaling.md
index 41a38a9f..bbd69dc4 100644
--- a/content/en/docs/concepts/function_scaling_trigger.md
+++ b/content/en/docs/concepts/function_scaling.md
@@ -1,7 +1,7 @@
---
-title: "Function Scaling and Triggers"
-linkTitle: "Function Scaling and Triggers"
-weight: 3210
+title: "Function Scaling"
+linkTitle: "Function Scaling"
+weight: 3220
description:
---
@@ -14,7 +14,7 @@ OpenFunction defines function scaling in `ScaleOptions` and defines triggers to
You can define unified function scale options for sync and async functions like below which will be valid for both sync and async functions:
```yaml
-apiVersion: core.openfunction.io/v1beta1
+apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-sample
@@ -30,18 +30,18 @@ Usually simply defining `minReplicas` and `maxReplicas` is not enough for async
> You can find more details of async function scale options in [KEDA ScaleObject Spec](https://keda.sh/docs/2.7/concepts/scaling-deployments/#scaledobject-spec) and [KEDA ScaledJob Spec](https://keda.sh/docs/2.7/concepts/scaling-jobs/#scaledjob-spec).
```yaml
-apiVersion: core.openfunction.io/v1beta1
+apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-sample
spec:
serving:
scaleOptions:
+ minReplicas: 0
+ maxReplicas: 10
keda:
scaledObject:
pollingInterval: 15
- minReplicaCount: 0
- maxReplicaCount: 10
cooldownPeriod: 60
advanced:
horizontalPodAutoscalerConfig:
@@ -61,7 +61,7 @@ You can also set advanced scale options for Knative sync functions too which wil
> You can find more details of the Knative sync function scale options [here](https://knative.dev/docs/serving/autoscaling/scale-bounds/#scale-down-delay)
```yaml
-apiVersion: core.openfunction.io/v1beta1
+apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-sample
@@ -69,8 +69,6 @@ spec:
serving:
scaleOptions:
knative:
- autoscaling.knative.dev/min-scale: "0"
- autoscaling.knative.dev/max-scale: "10"
autoscaling.knative.dev/initial-scale: "1"
autoscaling.knative.dev/scale-down-delay: "0"
autoscaling.knative.dev/window: "60s"
@@ -79,25 +77,26 @@ spec:
autoscaling.knative.dev/target: "100"
```
-## Triggers
+### Triggers
Triggers define how to activate function scaling for async functions. You can use triggers defined in all [KEDA scalers](https://keda.sh/docs/2.7/scalers/) as OpenFunction's trigger spec.
> Sync functions' scaling is activated by various options of HTTP requests which are already defined in the previous ScaleOption section.
```yaml
-apiVersion: core.openfunction.io/v1beta1
+apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-sample
spec:
serving:
- runtime: "async"
- triggers:
- - type: kafka
- metadata:
- topic: logs
- bootstrapServers: kafka-server-kafka-brokers.default.svc.cluster.local:9092
- consumerGroup: logs-handler
- lagThreshold: "20"
+ scaleOptions:
+ keda:
+ triggers:
+ - type: kafka
+ metadata:
+ topic: logs
+ bootstrapServers: kafka-server-kafka-brokers.default.svc.cluster.local:9092
+ consumerGroup: logs-handler
+ lagThreshold: "20"
```
\ No newline at end of file
diff --git a/content/en/docs/concepts/function_trigger.md b/content/en/docs/concepts/function_trigger.md
new file mode 100644
index 00000000..992e7548
--- /dev/null
+++ b/content/en/docs/concepts/function_trigger.md
@@ -0,0 +1,84 @@
+---
+title: "Function Trigger"
+linkTitle: "Function Trigger"
+weight: 3200
+description:
+---
+Function `Triggers` are used to define how to trigger a function. Currently, there are two kinds of triggers: `HTTP Trigger`, and `Dapr Trigger`. The default trigger is `HTTP trigger`.
+
+## HTTP Trigger
+
+`HTTP Trigger` triggers a function with an HTTP request. You can define an `HTTP Trigger` for a function like this:
+
+```yaml
+apiVersion: core.openfunction.io/v1beta2
+kind: Function
+metadata:
+ name: function-sample
+spec:
+ serving:
+ triggers:
+ http:
+ port: 8080
+ route:
+ rules:
+ - matches:
+ - path:
+ type: PathPrefix
+ value: /echo
+```
+
+## Dapr Trigger
+
+`Dapr Trigger` triggers a function with events from `Dapr bindings` or `Dapr pubsub`. You can define a function with `Dapr Trigger` like this:
+
+
+```yaml
+apiVersion: core.openfunction.io/v1beta2
+kind: Function
+metadata:
+ name: logs-async-handler
+ namespace: default
+spec:
+ serving:
+ bindings:
+ kafka-receiver:
+ metadata:
+ - name: brokers
+ value: kafka-server-kafka-brokers:9092
+ - name: authRequired
+ value: "false"
+ - name: publishTopic
+ value: logs
+ - name: topics
+ value: logs
+ - name: consumerGroup
+ value: logs-handler
+ type: bindings.kafka
+ version: v1
+ triggers:
+ dapr:
+ - name: kafka-receiver
+ type: bindings.kafka
+```
+
+## Function Inputs
+
+`Input` is where a function can get extra input data from, `Dapr State Stores` is supported as `Input` currently.
+
+You can define function input like this:
+
+```yaml
+apiVersion: core.openfunction.io/v1beta2
+kind: Function
+metadata:
+ name: logs-async-handler
+ namespace: default
+spec:
+ serving:
+ triggers:
+ inputs:
+ - dapr:
+ name: mysql
+ type: state.mysql
+```
\ No newline at end of file
diff --git a/content/en/docs/concepts/networking/function-entrypoints.md b/content/en/docs/concepts/networking/function-entrypoints.md
index 1a7c0d31..0f7f3dcc 100644
--- a/content/en/docs/concepts/networking/function-entrypoints.md
+++ b/content/en/docs/concepts/networking/function-entrypoints.md
@@ -73,9 +73,7 @@ To access a sync function by the external address, you'll need to configure DNS
state: Skipped
route:
conditions:
- - lastTransitionTime: "2022-08-20T11:03:14Z"
- message: Valid HTTPRoute
- observedGeneration: 13
+ - message: Valid HTTPRoute
reason: Valid
status: "True"
type: Accepted
@@ -126,9 +124,7 @@ To access a sync function by the external address, you'll need to configure DNS
state: Skipped
route:
conditions:
- - lastTransitionTime: "2022-08-20T13:07:17Z"
- message: Valid HTTPRoute
- observedGeneration: 14
+ - message: Valid HTTPRoute
reason: Valid
status: "True"
type: Accepted
diff --git a/content/en/docs/concepts/networking/gateway.md b/content/en/docs/concepts/networking/gateway.md
index e8001ff3..662ddf51 100644
--- a/content/en/docs/concepts/networking/gateway.md
+++ b/content/en/docs/concepts/networking/gateway.md
@@ -26,24 +26,18 @@ After an `OpenFunction Gateway` is deployed, you'll be able to find the status o
```yaml
status:
conditions:
- - lastTransitionTime: "2022-08-04T10:20:57Z"
- message: Gateway is scheduled
- observedGeneration: 2
+ - message: Gateway is scheduled
reason: Scheduled
status: "True"
type: Scheduled
- - lastTransitionTime: "2022-08-04T10:20:57Z"
- message: Valid Gateway
- observedGeneration: 2
+ - message: Valid Gateway
reason: Valid
status: "True"
type: Ready
listeners:
- attachedRoutes: 0
conditions:
- - lastTransitionTime: "2022-08-04T10:20:57Z"
- message: Valid listener
- observedGeneration: 2
+ - message: Valid listener
reason: Ready
status: "True"
type: Ready
@@ -53,9 +47,7 @@ status:
kind: HTTPRoute
- attachedRoutes: 0
conditions:
- - lastTransitionTime: "2022-08-04T10:20:57Z"
- message: Valid listener
- observedGeneration: 2
+ - message: Valid listener
reason: Ready
status: "True"
type: Ready
diff --git a/content/en/docs/concepts/networking/route.md b/content/en/docs/concepts/networking/route.md
index f440cd1d..21ec252d 100644
--- a/content/en/docs/concepts/networking/route.md
+++ b/content/en/docs/concepts/networking/route.md
@@ -35,9 +35,7 @@ status:
state: Skipped
route:
conditions:
- - lastTransitionTime: "2022-08-04T10:43:29Z"
- message: Valid HTTPRoute
- observedGeneration: 1
+ - message: Valid HTTPRoute
reason: Valid
status: "True"
type: Accepted
@@ -75,24 +73,24 @@ If `route.rules` is not defined, `route.rules` will be generated based on path o
```shell
kubectl apply -f - < Before you creating any functions, make sure you've installed all the [prerequisites](../prerequisites)
-Sync functions are funtions whose inputs are payloads of HTTP requests, and the output or response are sent to the waiting client immediately after the function logic finishes processing the inputs payload. Below you can find some sync function examples in different languages:
+Sync functions are functions whose inputs are payloads of HTTP requests, and the output or response are sent to the waiting client immediately after the function logic finishes processing the inputs payload. Below you can find some sync function examples in different languages:
| | Sync Functions |
|-----------|----------------|
diff --git a/content/en/docs/getting-started/installation.md b/content/en/docs/getting-started/installation.md
index 1b9ed6f3..1d18f543 100644
--- a/content/en/docs/getting-started/installation.md
+++ b/content/en/docs/getting-started/installation.md
@@ -13,19 +13,12 @@ This document describes how to install OpenFunction.
- You need to ensure your Kubernetes version meets the requirements described in the following compatibility matrix.
-| OpenFunction Version | Kubernetes 1.20 | Kubernetes 1.21 | Kubernetes 1.22 | Kubernetes 1.23 | Kubernetes 1.24 | Kubernetes 1.25 |
+| OpenFunction Version | Kubernetes 1.21 | Kubernetes 1.22 | Kubernetes 1.23 | Kubernetes 1.24 | Kubernetes 1.25 | Kubernetes 1.26+ |
|----------------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|
-| HEAD | N/A | √ | √ | √ | √ | √ |
-| v1.0.x | N/A | √ | √ | √ | √ | √ |
-| v0.8.x | √ | √ | √ | √ | √ | √* |
-| v0.7.0 | √ | √ | √ | √ | √ | N/A |
-
-{{% alert title="Note" color="success" %}}
-
-OpenFunction supports Kubernetes 1.25 starting from v0.8.1
-
-{{% /alert %}}
-
+| HEAD | N/A | N/A | √ | √ | √ | √ |
+| v1.2 | N/A | N/A | √ | √ | √ | √ |
+| v1.1.x | √ | √ | √ | √ | √ | N/A |
+| v1.0.x | √ | √ | √ | √ | √ | N/A |
## Install OpenFunction
diff --git a/content/en/docs/introduction.md b/content/en/docs/introduction.md
index 61ba2299..82e66a4f 100644
--- a/content/en/docs/introduction.md
+++ b/content/en/docs/introduction.md
@@ -13,7 +13,7 @@ OpenFunction is a cloud-native open source FaaS (Function as a Service) platform
## Architecture and Design
-
+
## Core Features
diff --git a/content/en/docs/operations/networking/switch-gateway.md b/content/en/docs/operations/networking/switch-gateway.md
index 5c643455..9040c3a4 100644
--- a/content/en/docs/operations/networking/switch-gateway.md
+++ b/content/en/docs/operations/networking/switch-gateway.md
@@ -68,23 +68,23 @@ EOF
```shell
kubectl apply -f - <
- Learn how to use the CLI of OpenFunction.
----
-
-This document describes how to use the CLI of OpenFunction.
-
-## Overview
-
-ofn is the command-line interface for OpenFunction. It helps you install and manage OpenFuntion.
-
-The following table describes the main commands supported by ofn.
-
-| Command | Description |
-| ------------- | ------------------------------------------------------------ |
-| `init` | Provides management for the framework of OpenFunction. |
-| `create` | Creates a function from a file or stdin. |
-| `apply` | Applies a function from a file or stdin. |
-| `demo` | Creates a [kind cluster](https://kind.sigs.k8s.io/) to install OpenFunction and run its demo. |
-| `get` | Prints a table of the most important information about the specified function. |
-| `get builder` | Prints important information about the Builder. |
-| `get serving` | Prints important information about the Serving. |
-| `delete` | Deletes the specified function. |
-
-## `ofn demo` Parameters
-
-The following table describes parameters available for the `ofn demo` command.
-
-| Parameter | Description |
-| ------------ | ------------------------------------------------------------ |
-| --auto-prune | For removing the demo kind cluster. To keep the demo kind cluster, run `ofn demo --auto-prune=false`, and you can delete the demo kind cluster by running `kind delete cluster --name openfunction`. |
-| --verbose | For displaying detailed information. |
-| --region-cn | For users who have limited access to gcr.io or github.com. |
-
diff --git a/content/en/docs/reference/component-reference/function-spec.md b/content/en/docs/reference/component-reference/function-spec.md
index d0d723d4..79f9e1b5 100644
--- a/content/en/docs/reference/component-reference/function-spec.md
+++ b/content/en/docs/reference/component-reference/function-spec.md
@@ -8,162 +8,270 @@ description: >
This document describes the specifications of the Function CRD.
-## Function
-
-| Field | Description |
-| ------------------------------------------------------------ | ------------------------------------------------------------ |
-| **apiVersion** *string* | core.openfunction.io/v1alpha2 |
-| **kind** *string* | Function |
-| **metadata** *[v1.ObjectMeta](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#ObjectMeta)* | *(Optional)* Refer to [v1.ObjectMeta](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#ObjectMeta) |
-| **spec** *[FunctionSpec](#functionspec)* | Refer to [FunctionSpec](#functionspec) |
-| **status** *FunctionStatus* | Refer to FunctionStatus |
-
-### FunctionSpec
-
-*Belong to [Function](#function)*.
-
-| Field | Description |
-| ------------------------------------------------------------ | ------------------------------------------------------------ |
-| **version** *string* | *(Optional)* Function version, e.g. `v1.0.0` |
-| **image** *string* | Image upload path, e.g. `demorepo/demofunction:v1` |
-| **imageCredentials** *[v1.LocalObjectReference](https://pkg.go.dev/k8s.io/api/core/v1#LocalObjectReference)* | *(Optional)* Credentials for accessing the image repository, refer to [v1.LocalObjectReference](https://pkg.go.dev/k8s.io/api/core/v1#LocalObjectReference) |
-| **port** *int32* | *(Optional)* The port the function is listening on, e.g. `8080` |
-| **build** *[BuildImpl](#buildimpl)* | *(Optional)* Builder specification for the function, see [BuildImpl](#buildimpl) |
-| **serving** *[ServingImpl](#servingimpl)* | *(Optional)* Serving specification for the function, see [ServingImpl](#servingimpl) |
-
-### BuildImpl
-
-*Belong to [FunctionSpec](#functionspec)*.
-
-| Field | Description |
-| ------------------------------------------------------------ | ------------------------------------------------------------ |
-| **builder** *string* | Name of the Builder |
-| **builderCredentials** *[v1.LocalObjectReference](https://pkg.go.dev/k8s.io/api/core/v1#LocalObjectReference)* | *(Optional)* Credentials for accessing the image repository, refer to [v1.LocalObjectReference](https://pkg.go.dev/k8s.io/api/core/v1#LocalObjectReference) |
-| **shipwright** *[ShipwrightEngine](#shipwrightengine)* | *(Optional)* Specification of the Shipwright engine, refer to [ShipwrightEngine](#shipwrightengine) |
-| **params** *map[string]string* | *(Optional)* Parameters passed to Shipwright |
-| **env** map[string]string | *(Optional)* Parameters passed to the buildpacks builder |
-| **srcRepo** *[GitRepo](#gitrepo)* | The configuration of the source code repository, refer to [GitRepo](#gitrepo) |
-| **dockerfile** *string* | *(Optional)* Path to the Dockerfile instructing Shipwright when using the Dockerfile to build images |
-
-### ShipwrightEngine
-
-*Belong to [BuildImpl](#buildimpl)*.
-
-| Field | Description |
-| ------------------------------------------------------------ | ------------------------------------------------------------ |
-| **strategy** *[Strategy](#strategy)* | *(Optional)* Index of image build strategy, refer to [Strategy](#strategy) |
-| **timeout** *[v1.Duration](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration)* | *(Optional)* Build timeout, refer to [v1.Duration](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration) |
-
-### Strategy
-
-*Belong to [ShipwrightEngine](#shipwrightengine)*.
-
-| Field | Description |
-| --------------- | ------------------------------------------------------------ |
-| **name** string | Name of the strategy |
-| **kind** string | *(Optional)* Kind of the build strategy, which defaults to "BuildStrategy" or optional "ClusterBuildStrategy" |
-
-### GitRepo
-
-*Belong to [BuildImpl](#buildimpl)*.
-
-| Field | Description |
-| ------------------------------------------------------------ | ------------------------------------------------------------ |
-| **url** *string* | Source code repository address |
-| **revision** *string* | *(Optional)* Referenceable instances in the repository, such as commit ID and branch name. |
-| **sourceSubPath** *string* | *(Optional)* The directory of the function in the repository, e.g. `functions/function-a/` |
-| **credentials** *[v1.LocalObjectReference](https://pkg.go.dev/k8s.io/api/core/v1#LocalObjectReference)* | *(Optional)* Repository access credentials, refer to [v1.LocalObjectReference](https://pkg.go.dev/k8s.io/api/core/v1#LocalObjectReference) |
-
-### ServingImpl
-
-*Belong to [FunctionSpec](#functionspec)*.
-
-| Field | Description |
-| ------------------------------------------------------------ | ------------------------------------------------------------ |
-| **runtime** *string* | Type of load runtime, optional: `Knative`, `OpenFuncAsync` |
-| **params** *map[string]string* | *(Optional)* Parameters passed to the workloads |
-| **openFuncAsync** *[OpenFuncAsyncRuntime](#openfuncasyncruntime)* | *(Optional)* Used to define the configuration of OpenFuncAsync when the runtime is OpenFuncAsync, see [OpenFuncAsyncRuntime](#openfuncasyncruntime) |
-| **template** *[v1.PodSpec](https://pkg.go.dev/k8s.io/api/core/v1#PodSpec)* | *(Optional)* Template for the definition of Pods in the workloads, refer to [v1.PodSpec](https://pkg.go.dev/k8s.io/api/core/v1#PodSpec) |
-
-### OpenFuncAsyncRuntime
-
-*Belong to [ServingImpl](#servingimpl)*.
-
-| Field | Description |
-| ------------------------ | ------------------------------------------------------------ |
-| **dapr** *[Dapr](#dapr)* | *(Optional)* Definition of Dapr components, see [Dapr](#dapr) |
-| **keda** *[Keda](#keda)* | *(Optional)* Definition of Keda, see [Keda](#keda) |
-
-### Dapr
-
-*Belong to [OpenFuncAsyncRuntime](#openfuncasyncruntime)*.
-
-| Field | Description |
-| ------------------------------------------------------------ | ------------------------------------------------------------ |
-| **annotations** *map[string]string* | *(Optional)* Annotations for Dapr components, see [Dapr documentation](https://docs.dapr.io/reference/arguments-annotations-overview/) |
-| **components** *map\[string][componentsv1alpha1.ComponentSpec](https://docs.dapr.io/reference/components-reference/)* | *(Optional)* Dapr Components Spec map, with key being component's name and value being [componentsv1alpha1.ComponentSpec](https://docs.dapr.io/reference/components-reference/) |
-| **inputs** *\[][DaprIO](#daprio)* | *(Optional)* The definition of the inputs of the function, see [DaprIO](#daprio) |
-| **outputs** *\[][DaprIO](#daprio)* | *(Optional)* The definition of the outputs of the function, see [DaprIO](#daprio) |
-
-### DaprIO
-
-*Belong to [Dapr](#dapr)*.
-
-| Field | Description |
-| ------------------------------ | ------------------------------------------------------------ |
-| **name** *string* | Name of the input and output of the function. Consistent with the name of [DaprComponent](#daprcomponent) means associated |
-| **component** *string* | Indicates the name of components |
-| **type** *string* | Type of Dapr component, optional: `bindings`, `pubsub` |
-| **topic** *string* | *(Optional)* When the **type** is `pubsub`, you need to set the topic |
-| **operation** *string* | *(Optional)* Operation field tells the Dapr component which operation it should perform, refer to [Dapr docs](https://docs.dapr.io/reference/components-reference/supported-bindings/kafka/#binding-support) |
-| **params** *map[string]string* | *(Optional)* Parameters passed to Dapr |
-
-### Keda
-
-*Belong to [OpenFuncAsyncRuntime](#openfuncasyncruntime)*.
-
-| Field | Description |
-| -------------------------------------------------------- | ------------------------------------------------------------ |
-| **scaledObject** *[KedaScaledObject](#kedascaledobject)* | Definition of KEDA scalable objects (Deployments), refer to [KedaScaledObject](#kedascaledobject) |
-| **scaledJob** *[KedaScaledJob](#kedascaledjob)* | Definition of KEDA scalable jobs, refer to [KedaScaledJob](#kedascaledjob) |
-
-### KedaScaledObject
-
-*Belong to [Keda](#keda)*.
-
-{{% alert title="Note" color="success" %}}
-
-For more information, see [Scaling Deployments, StatefulSets & Custom Resources](https://keda.sh/docs/2.4/concepts/scaling-deployments/).
-
-{{% /alert %}}
-
-| Field | Description |
-| ------------------------------------------------------------ | ------------------------------------------------------------ |
-| **workloadType** *string* | How to run the function, known values are `Deployment` or `StatefulSet`, which defaults to `Deployment`. |
-| **pollingInterval** *int32* | *(Optional)* The `pollingInterval` is in seconds. This is the interval in which KEDA checks the triggers for the queue length or the stream lag. It defaults to `30` seconds. |
-| **cooldownPeriod** *int32* | *(Optional)* The `cooldownPeriod` is in seconds, and it is the period of time to wait after the last trigger activated before scaling back down to 0. It defaults to `300` seconds. |
-| **minReplicaCount** *int32* | *(Optional)* Minimum number of replicas which KEDA will scale the resource down to. By default, it scales to `0`. |
-| **maxReplicaCount** *int32* | *(Optional)* This setting is passed to the HPA definition that KEDA will create for a given resource. |
-| **advanced** *[kedav1alpha1.AdvancedConfig](https://pkg.go.dev/github.com/kedacore/keda/v2/api/v1alpha1#AdvancedConfig)* | *(Optional)* This property specifies whether the target resource (for example, `Deployment` and `StatefulSet`) should be scaled back to original replicas count after the `ScaledObject` is deleted. Default behavior is to keep the replica count at the same number as it is in the moment of `ScaledObject` deletion. Refer to [kedav1alpha1.AdvancedConfig](https://pkg.go.dev/github.com/kedacore/keda/v2/api/v1alpha1#AdvancedConfig). |
-| **triggers** *\[][kedav1alpha1.ScaleTriggers](https://pkg.go.dev/github.com/kedacore/keda/v2/api/v1alpha1#ScaleTriggers)* | Event sources that trigger dynamic scaling of workloads. Refer to [kedav1alpha1.ScaleTriggers](https://pkg.go.dev/github.com/kedacore/keda/v2/api/v1alpha1#ScaleTriggers). |
-
-### KedaScaledJob
-
-*Belong to [Keda](#keda)*.
-
-{{% alert title="Note" color="success" %}}
-
-For more information, see [Scaling Jobs](https://keda.sh/docs/2.4/concepts/scaling-jobs/).
-
-{{% /alert %}}
-
-| Field | Description |
-| ------------------------------------------------------------ | ------------------------------------------------------------ |
-| **restartPolicy** *[v1.RestartPolicy](https://pkg.go.dev/k8s.io/api/core/v1#RestartPolicy)* | Restart policy for all containers within the pod. Value options are `OnFailure` or `Never`. It defaults to `Never`. |
-| **pollingInterval** *int32* | *(Optional)* The `pollingInterval` is in seconds. This is the interval in which KEDA checks the triggers for the queue length or the stream lag. It defaults to `30` seconds. |
-| **successfulJobsHistoryLimit** *int32* | *(Optional)* How many completed jobs should be kept. It defaults to `100`. |
-| **failedJobsHistoryLimit** *int32* | *(Optional)* How many failed jobs should be kept. It defaults to `100`. |
-| **maxReplicaCount** *int32* | *(Optional)* The max number of pods that is created within a single polling period. |
-| **scalingStrategy** *[kedav1alpha1.ScalingStrategy](https://pkg.go.dev/github.com/kedacore/keda/v2/api/v1alpha1#ScalingStrategy)* | *(Optional)* Select a scaling strategy. Value options are `default`, `custom`, or `accurate`. The default value is `default`. Refer to [kedav1alpha1.ScalingStrategy](https://pkg.go.dev/github.com/kedacore/keda/v2/api/v1alpha1#ScalingStrategy). |
-| **triggers** *\[][kedav1alpha1.ScaleTriggers](https://pkg.go.dev/github.com/kedacore/keda/v2/api/v1alpha1#ScaleTriggers)* | Event sources that trigger dynamic scaling of workloads, refer to [kedav1alpha1.ScaleTriggers](https://pkg.go.dev/github.com/kedacore/keda/v2/api/v1alpha1#ScaleTriggers). |
+## Function.spec
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| **image** | string | Image upload path, e.g. demorepo/demofunction:v1 | true |
+| [build](#functionspecbuild) | object | Builder specification for the function | false |
+| **imageCredentials** | object | Credentials for accessing the image repository, refer to v1.LocalObjectReference | false |
+| [serving](#functionspecserving) | object | Serving specification for the function | false |
+| **version** | string | Function version, e.g. v1.0.0 | false |
+| **workloadRuntime** | string | WorkloadRuntime for Function. Know values: OCIContainer and WasmEdge.Default: OCIContainer | false |
+
+### Function.spec.build
+[↩ Parent](#functionspec)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| [srcRepo](#functionspecbuildsrcrepo) | object | The configuration of the source code repository | true |
+| **builder** | string | Name of the Builder | false |
+| **builderCredentials** | object | Credentials for accessing the image repository, refer to [v1.LocalObjectReference](https://pkg.go.dev/k8s.io/api/core/v1#LocalObjectReference) | false |
+| **builderMaxAge** | string | The maximum time of finished builders to retain. | false |
+| **dockerfile** | string | Path to the Dockerfile instructing Shipwright when using the Dockerfile to build images | false |
+| **env** | map[string]string | Environment variables passed to the buildpacks builder | false |
+| **failedBuildsHistoryLimit** | integer | The number of failed builders to retain. Default is 1. | false |
+| [shipwright](#functionspecbuildshipwright) | object | Specification of the Shipwright engine | false |
+| **successfulBuildsHistoryLimit** | integer | The number of successful finished builders to retain. Default is 0. | false |
+| **timeout** | string | The maximum time for the builder to build the image | false |
+
+### Function.spec.build.srcRepo
+[↩ Parent](#functionspecbuild)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| [bundleContainer](#functionspecbuildsrcrepobundlecontainer) | object | BundleContainer describes the source code bundle container to pull | false |
+| **credentials** | object | Repository access credentials, refer to v1.LocalObjectReference | false |
+| **revision** | string | Referencable instances in the repository, such as commit ID and branch name. | false |
+| **sourceSubPath** | string | The directory of the function in the repository, e.g. functions/function-a/ | false |
+| **url** | string | Source code repository address | false |
+
+### Function.spec.build.srcRepo.bundleContainer
+[↩ Parent](#functionspecbuildsrcrepo)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| **image** | string | The bundleContainer image name | true |
+
+### Function.spec.build.shipwright
+[↩ Parent](#functionspecbuild)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| **params** | []object | Parameters for the build strategy | false |
+| [strategy](../../../concepts/build_strategy) | object | Strategy references the BuildStrategy to use to build the image | false |
+| **timeout** | string | The maximum amount of time the shipwright Build should take to execute | false |
+
+### Function.spec.serving
+[↩ Parent](#functionspec)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| **annotations** | map[string]string | Annotations that will be added to the workload | false |
+| **bindings** | map[string]object | [Dapr bindings](https://docs.dapr.io/developing-applications/building-blocks/bindings/) that the function needs to create and use. | false |
+| [hooks](#functionspecservinghooks) | object | Hooks that will be executed before or after the function execution | false |
+| **labels** | map[string]string | Labels that will be added to the workload | false |
+| [outputs](#functionspecservingoutputsindex) | []object | The outputs which the function will send data to | false |
+| **params** | map[string]string | Parameters required by the function, will be passed to the function as environment variables | false |
+| **pubsub** | map[string]object | [Dapr pubsub](https://docs.dapr.io/developing-applications/building-blocks/pubsub/) that the function needs to create and use | false |
+| [scaleOptions](#functionspecservingscaleoptions) | object | Configuration of auto scaling. | false |
+| [states](#functionspecservingstateskey) | map[string]object | Dapr state store that the function needs to create and use | false |
+| **template** | object | Template is a pod template which allows modifying operator generated pod template. | false |
+| **timeout** | string | Timeout defines the maximum amount of time the Serving should take to execute before the Serving is running | false |
+| [tracing](#functionspecservingtracing) | object | Configuration of tracing | false |
+| **triggers** | object | Triggers used to trigger the function. Refer to [Function Trigger](../../../concepts/function_trigger). | true |
+| **workloadType** | string | The type of workload used to run the function, known values are: Deployment, StatefulSet and Job | false |
+
+### Function.spec.serving.hooks
+[↩ Parent](#functionspecserving)
+
+
+
+
+
Name
+
Type
+
Description
+
Required
+
+
+
+
policy
+
string
+
+ There are two kind of hooks, global hooks and private hooks, the global hooks define in the config file of OpenFunction Controller,
+ the private hooks define in the Function. Policy is the relationship between the global hooks and the private hooks of the function. Known values are:
+
+ Append: All hooks will be executed, the private pre hooks will execute after the global pre hooks , and the private post hooks will execute before the global post hooks. this is the default policy.
+ Override: Only execute the private hooks.
+
+
false
+
+
post
+
[]string
+
+ The hooks will be executed after the function execution
+
+
false
+
+
pre
+
[]string
+
+ The hooks will be executed before the function execution
+
+
false
+
+
+
+### Function.spec.serving.outputs[index]
+[↩ Parent](#functionspecserving)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| [dapr](#functionspecservingoutputsindexdapr) | object | Dapr output, refer to a exist component or a component defined in bindings or pubsub | false |
+
+### Function.spec.serving.outputs[index].dapr
+[↩ Parent](#functionspecservingoutputsindex)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| **name** | string | The name of the dapr component | true |
+| **metadata** | map[string]string | Metadata passed to Dapr | false |
+| **operation** | string | Operation field tells the Dapr component which operation it should perform, refer to [Dapr docs](https://docs.dapr.io/reference/components-reference/supported-bindings/kafka/#binding-support) | false |
+| **topic** | string | When the type is pubsub, you need to set the topic | false |
+| **type** | string | Type of Dapr component, such as: bindings.kafka, pubsub.rocketmq | false |
+
+### Function.spec.serving.scaleOptions
+[↩ Parent](#functionspecserving)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| [keda](#functionspecservingscaleoptionskeda) | object | Configuration about keda autoscaling | false |
+| **knative** | map[string]string | Knative autiscaling annotations. Refer to [Knative autoscaling](https://knative.dev/docs/serving/autoscaling/). | false |
+| **maxReplicas** | integer | Minimum number of replicas which will scale the resource down to. By default, it scales to 0. | false |
+| **minReplicas** | integer | Maximum number of replicas which will scale the resource up to. | false |
+
+### Function.spec.serving.scaleOptions.keda
+[↩ Parent](#functionspecservingscaleoptions)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| [scaledJob](#functionspecservingscaleoptionskedascaledjob) | object | Scale options for job | false |
+| [scaledObject](#functionspecservingscaleoptionskedascaledobject) | object | Scale options for deployment and statefulset | false |
+| **triggers** | []object | Event sources that trigger dynamic scaling of workloads. Refer to [kedav1alpha1.ScaleTriggers](https://pkg.go.dev/github.com/kedacore/keda/v2/api/v1alpha1#ScaleTriggers). | false |
+
+### Function.spec.serving.scaleOptions.keda.scaledJob
+[↩ Parent](#functionspecservingscaleoptionskeda)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| **failedJobsHistoryLimit** | integer | How many failed jobs should be kept. It defaults to 100. | false |
+| **pollingInterval** | integer | The pollingInterval is in seconds. This is the interval in which KEDA checks the triggers for the queue length or the stream lag. It defaults to 30 seconds. | false |
+| **restartPolicy** | string | Restart policy for all containers within the pod. Value options are OnFailure or Never. It defaults to Never. | false |
+| **scalingStrategy** | object | Select a scaling strategy. Value options are default, custom, or accurate. The default value is default. Refer to kedav1alpha1.ScalingStrategy | false |
+| **successfulJobsHistoryLimit** | integer | How many completed jobs should be kept. It defaults to 100. | false |
+
+### Function.spec.serving.scaleOptions.keda.scaledObject
+[↩ Parent](#functionspecservingscaleoptionskeda)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| **advanced** | object | This property specifies whether the target resource (for example, Deployment and StatefulSet) should be scaled back to original replicas count after the ScaledObject is deleted. Default behavior is to keep the replica count at the same number as it is in the moment of ScaledObject deletion. Refer to [kedav1alpha1.AdvancedConfig](https://pkg.go.dev/github.com/kedacore/keda/v2/api/v1alpha1#AdvancedConfig). | false |
+| **cooldownPeriod** | integer | The cooldownPeriod is in seconds, and it is the period of time to wait after the last trigger activated before scaling back down to 0. It defaults to 300 seconds. | false |
+| **pollingInterval** | integer | The pollingInterval is in seconds. This is the interval in which KEDA checks the triggers for the queue length or the stream lag. It defaults to 30 seconds. | false |
+
+### Function.spec.serving.states[key]
+[↩ Parent](#functionspecserving)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| **spec** | object | Dapr state stroe component spec. Refer to [Dapr docs](https://docs.dapr.io/developing-applications/building-blocks/state-management/). | false |
+
+### Function.spec.serving.tracing
+[↩ Parent](#functionspecserving)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| **baggage** | map[string]string | Baggage is contextual information that passed between spans. It is a key-value store that resides alongside span context in a trace, making values available to any span created within that trace. | true |
+| **enabled** | boolean | Wether to enable tracing | true |
+| [provider](#functionspecservingtracingprovider) | object | The tracing implementation used to create and send span | true |
+| **tags** | map[string]string | The tag that needs to be added to the spans | false |
+
+### Function.spec.serving.tracing.provider
+[↩ Parent](#functionspecservingtracing)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| **name** | string | Tracing provider name, known values are skywalking and opentelemetry | true |
+| [exporter](#functionspecservingtracingproviderexporter) | object | Service to collect span for opentelemetry | false |
+| **oapServer** | string | The skywalking server url | false |
+
+### Function.spec.serving.tracing.provider.exporter
+[↩ Parent](#functionspecservingtracingprovider)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| **endpoint** | string | The exporter url | true |
+| **name** | string | The exporter name, known values are otlp, jaeger, and zipkin | true |
+| **compression** | string | The compression type to use on OTLP trace requests. Options include gzip. By default no compression will be used. | false |
+| **headers** | string | Key-value pairs separated by commas to pass as request headers on OTLP trace requests. | false |
+| **protocol** | string | The transport protocol to use on OTLP trace requests. Options include grpc and http/protobuf. Default is grpc. | false |
+| **timeout** | string | The maximum waiting time, in milliseconds, allowed to send each OTLP trace batch. Default is 10000. | false |
+
+### Function.spec.serving.triggers
+[↩ Parent](#functionspecserving)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| [dapr](#functionspecservingtriggersdaprindex) | []object | List of dapr triggers, refer to dapr bindings or pusub components | false |
+| [http](#functionspecservingtriggershttp) | object | The http trigger | false |
+| [inputs](#functionspecservingtriggersinputsindex) | []object | A list of components that the function can get data from | false |
+
+### Function.spec.serving.triggers.dapr[index]
+[↩ Parent](#functionspecservingtriggers)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| **name** | string | The dapr component name | true |
+| **topic** | string | When the component type is pubsub, you need to set the topic | false |
+| **type** | string | Type of Dapr component, such as: bindings.kafka, pubsub.rocketmq | false |
+
+### Function.spec.serving.triggers.http
+[↩ Parent](#functionspecservingtriggers)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| **port** | integer | The port the function is listening on, e.g. 8080 | false |
+| [route](#functionspecservingtriggershttproute) | object | Route defines how traffic from the Gateway listener is routed to a function. | false |
+
+### Function.spec.serving.triggers.http.route
+[↩ Parent](#functionspecservingtriggershttp)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| [gatewayRef](#functionspecservingtriggershttproutegatewayref) | object | GatewayRef references the Gateway resources that a Route wants | false |
+| **hostnames** | []string | Hostnames defines a set of hostname that should match against the HTTP Host header to select a HTTPRoute to process the request. | false |
+| **rules** | []object | Rules are a list of HTTP matchers, filters and actions. Refer to [HTTPRouteRule](https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1beta1.HTTPRouteRule). | false |
+
+### Function.spec.serving.triggers.http.route.gatewayRef
+[↩ Parent](#functionspecservingtriggershttproute)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| **name** | string | The name of the gateway | true |
+| **namespace** | string | The namespace of the gateway | true |
+
+### Function.spec.serving.triggers.inputs[index]
+[↩ Parent](#functionspecservingtriggers)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| [dapr](#functionspecservingtriggersinputsindexdapr) | object | A dapr component that function can get data from. Now just support dapr state store | true |
+
+### Function.spec.serving.triggers.inputs[index].dapr
+[↩ Parent](#functionspecservingtriggersinputsindex)
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| **name** | string | The dapr component name, maybe a exist component or a component defined in state | true |
+| **type** | string | The dapr component type, such as state.redis | false |
diff --git a/content/en/docs/reference/faq.md b/content/en/docs/reference/faq.md
index 82b39234..5f81e4dd 100644
--- a/content/en/docs/reference/faq.md
+++ b/content/en/docs/reference/faq.md
@@ -142,7 +142,7 @@ You can refer to the `Global(ConfigMap)` and `Global(Operator)` sections of this
And for `Per Revision` you can configure it like [this](../../concepts/function_scaling_trigger/).
```yaml
-apiVersion: core.openfunction.io/v1beta1
+apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-sample
@@ -150,8 +150,7 @@ spec:
serving:
scaleOptions:
knative:
- autoscaling:
- target: "200"
+ autoscaling.knative.dev/target: "200"
```
#### Hard limit
@@ -176,7 +175,7 @@ spec:
autoscaling.knative.dev/: "value"
# Configuration in OpenFunction (recommended)
-apiVersion: core.openfunction.io/v1beta1
+apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-sample
@@ -184,11 +183,10 @@ spec:
serving:
scaleOptions:
knative:
- autoscaling:
: "value"
# Alternative approach
-apiVersion: core.openfunction.io/v1beta1
+apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-sample
@@ -218,7 +216,7 @@ spec:
dapr.io/app-max-concurrency: "value"
# Configuration in OpenFunction (recommended)
-apiVersion: core.openfunction.io/v1beta1
+apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-sample
@@ -524,7 +522,7 @@ A: Let's take [Java functions](https://github.com/OpenFunction/samples/tree/main
- Modify `functions/knative/java/hello-world/function-sample.yaml` according to your environment:
```yaml
- apiVersion: core.openfunction.io/v1beta1
+ apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-http-java
@@ -533,7 +531,6 @@ A: Let's take [Java functions](https://github.com/OpenFunction/samples/tree/main
image: "/sample-java-func:v1"
imageCredentials:
name: push-secret
- port: 8080 # default to 8080
build:
builder: /builder-java:v2-18
params:
@@ -552,7 +549,9 @@ A: Let's take [Java functions](https://github.com/OpenFunction/samples/tree/main
containers:
- name: function # DO NOT change this
imagePullPolicy: IfNotPresent
- runtime: "knative"
+ triggers:
+ http:
+ port: 8080
```
> If your private mirror repository is insecure, please refer to [Use private image repository in an insecure way](https://openfunction.dev/docs/reference/faq/#q-how-to-use-private-image-repositories-in-openfunction)
diff --git a/content/en/openfunction-0.5-architecture.svg b/content/en/openfunction-0.5-architecture.svg
deleted file mode 100644
index e4bb9381..00000000
--- a/content/en/openfunction-0.5-architecture.svg
+++ /dev/null
@@ -1,287 +0,0 @@
-
diff --git a/content/zh/OpenFunction-architecture.png b/content/zh/OpenFunction-architecture.png
deleted file mode 100644
index 3573d1ac..00000000
Binary files a/content/zh/OpenFunction-architecture.png and /dev/null differ
diff --git a/content/zh/_index.html b/content/zh/_index.html
index 817c64bd..f02668c4 100644
--- a/content/zh/_index.html
+++ b/content/zh/_index.html
@@ -8,7 +8,7 @@