Skip to content

Commit

Permalink
Fix some YAML files and README.md documents still remain in v1beta1 f…
Browse files Browse the repository at this point in the history
…ormat

Starting from version v1.1.0, the core v1beta1 API is deprecated and will be removed in the future. However, in some YAML files and README.md documents, there are still remain in v1beta1 format.

Fixes: OpenFunction#146

Signed-off-by: juwei008 <[email protected]>
  • Loading branch information
juwei008 committed Apr 11, 2024
1 parent 318ee24 commit cbe6968
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions apps/buildah/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Follow [this guide](https://openfunction.dev/docs/getting-started/quickstarts/pr
For sample function below, modify the ``spec.image`` field in ``sample-java-app.yaml`` to your own container registry address:

```yaml
apiVersion: core.openfunction.io/v1beta1
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: sample-java-app
Expand Down Expand Up @@ -74,4 +74,4 @@ Access functions by the external address:
```shell
curl http://sample-java-app.default.ofn.io
```


4 changes: 2 additions & 2 deletions functions/async/bindings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ We will use the sample in the `cron-input` directory, which will be triggered by
Modify the `spec.image` field in `cron-input/cron-input.yaml` to your own container registry address:

```yaml
apiVersion: core.openfunction.io/v1beta1
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: cron-input
Expand Down Expand Up @@ -59,7 +59,7 @@ We will use the sample in the `cron-input-kafka-output` directory, which will be
Modify the `spec.image` field in `cron-input-kafka-output/cron-input-kafka-output.yaml` to your own container registry address:

```yaml
apiVersion: core.openfunction.io/v1beta1
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: cron-input-kafka-output
Expand Down
2 changes: 1 addition & 1 deletion functions/async/java/cron-input-kafka-output/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The `cron-input-kafka-output-java` function will be triggered by Dapr's `binding
Modify the `spec.image` field in `cron-input-kafka-output.yaml` to your own container registry address:

```yaml
apiVersion: core.openfunction.io/v1beta1
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: cron-input-kafka-output-java
Expand Down
2 changes: 1 addition & 1 deletion functions/async/java/pubsub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Follow [this guide](../../pubsub/README.md#Build-and-deploy-Producer) to deploy
Modify the ``spec.image`` field in `function-subscribe.yaml` to your own container registry address:

```yaml
apiVersion: core.openfunction.io/v1beta1
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: autoscaling-subscriber-java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Function
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"core.openfunction.io/v1beta1","kind":"Function","metadata":{"annotations":{},"name":"logs-async-handler","namespace":"default"},"spec":{"build":{"builder":"openfunction/builder-go:latest","env":{"FUNC_CLEAR_SOURCE":"true","FUNC_NAME":"LogsHandler"},"srcRepo":{"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":{"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"},"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"}},"inputs":[{"component":"kafka-receiver","name":"kafka"}],"outputs":[{"component":"notification-manager","name":"notify","operation":"post"}],"runtime":"async","scaleOptions":{"keda":{"scaledObject":{"advanced":{"horizontalPodAutoscalerConfig":{"behavior":{"scaleDown":{"policies":[{"periodSeconds":15,"type":"Percent","value":50}],"stabilizationWindowSeconds":45},"scaleUp":{"stabilizationWindowSeconds":0}}}},"cooldownPeriod":60,"maxReplicaCount":10,"minReplicaCount":0,"pollingInterval":15}}},"template":{"containers":[{"imagePullPolicy":"IfNotPresent","name":"function"}]},"triggers":[{"metadata":{"bootstrapServers":"kafka-server-kafka-brokers.default.svc.cluster.local:9092","consumerGroup":"logs-handler","lagThreshold":"20","topic":"logs"},"type":"kafka"}]},"version":"v2.0.0"}}
{"apiVersion":"core.openfunction.io/v1beta2","kind":"Function","metadata":{"annotations":{},"name":"logs-async-handler","namespace":"default"},"spec":{"build":{"builder":"openfunction/builder-go:latest","env":{"FUNC_CLEAR_SOURCE":"true","FUNC_NAME":"LogsHandler"},"srcRepo":{"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":{"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"},"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"}},"inputs":[{"component":"kafka-receiver","name":"kafka"}],"outputs":[{"component":"notification-manager","name":"notify","operation":"post"}],"runtime":"async","scaleOptions":{"keda":{"scaledObject":{"advanced":{"horizontalPodAutoscalerConfig":{"behavior":{"scaleDown":{"policies":[{"periodSeconds":15,"type":"Percent","value":50}],"stabilizationWindowSeconds":45},"scaleUp":{"stabilizationWindowSeconds":0}}}},"cooldownPeriod":60,"maxReplicaCount":10,"minReplicaCount":0,"pollingInterval":15}}},"template":{"containers":[{"imagePullPolicy":"IfNotPresent","name":"function"}]},"triggers":[{"metadata":{"bootstrapServers":"kafka-server-kafka-brokers.default.svc.cluster.local:9092","consumerGroup":"logs-handler","lagThreshold":"20","topic":"logs"},"type":"kafka"}]},"version":"v2.0.0"}}
creationTimestamp: "2023-05-19T02:19:38Z"
generation: 1
name: logs-async-handler
Expand Down
2 changes: 1 addition & 1 deletion functions/async/pubsub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ kubectl apply -f deploy.yaml
Modify the ``spec.image`` field in `subscriber/function-subscribe.yaml` to your own container registry address:

```yaml
apiVersion: core.openfunction.io/v1beta1
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: autoscaling-subscriber
Expand Down
4 changes: 2 additions & 2 deletions functions/knative/hello-world-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ You can create this secret by editing the ``REGISTRY_SERVER``, ``REGISTRY_USER``
For sample function below, modify the ``spec.image`` field in ``function-sample.yaml`` to your own container registry address:

```yaml
apiVersion: core.openfunction.io/v1beta1
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-sample
Expand Down Expand Up @@ -142,4 +142,4 @@ You can create this secret by editing the ``REGISTRY_SERVER``, ``REGISTRY_USER``
curl http://serving-q6wdp-ksvc-wk6mv.default.<external-ip>.sslip.io/OpenFunction
Hello, OpenFunction!
```
```
4 changes: 2 additions & 2 deletions functions/knative/hello-world-node/commonjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
You can define a common JavaScript Function as below:

```yaml
apiVersion: core.openfunction.io/v1beta1
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: node-sample
Expand All @@ -33,4 +33,4 @@ spec:
containers:
- name: function # DO NOT change this
imagePullPolicy: IfNotPresent
```
```
4 changes: 2 additions & 2 deletions functions/knative/hello-world-node/esm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ OpenFunction Nodejs Functions Framework supports loading your function code as a
You can define a ESM JavaScript Function as below:

```yaml
apiVersion: core.openfunction.io/v1beta1
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: node-sample
Expand All @@ -37,4 +37,4 @@ spec:
containers:
- name: function # DO NOT change this
imagePullPolicy: IfNotPresent
```
```
2 changes: 1 addition & 1 deletion functions/knative/java/cloudevent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Follow [this guide](https://openfunction.dev/docs/getting-started/quickstarts/pr
For sample function below, modify the ``spec.image`` field in ``function-sample.yaml`` to your own container registry address:

```yaml
apiVersion: core.openfunction.io/v1beta1
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-cloudevent-java
Expand Down
4 changes: 2 additions & 2 deletions functions/knative/java/hello-world/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Follow [this guide](https://openfunction.dev/docs/getting-started/quickstarts/pr
For sample function below, modify the ``spec.image`` field in ``function-sample.yaml`` to your own container registry address:

```yaml
apiVersion: core.openfunction.io/v1beta1
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-http-java
Expand Down Expand Up @@ -97,4 +97,4 @@ Access functions by the external address:
curl http://function-http-java.default.ofn.io
Hello, World!
```


4 changes: 2 additions & 2 deletions functions/knative/java/with-output-binding/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Use the following command to create the function:
The function plugin mechanism is also demonstrated in `function-front`, and you can observe the following configuration in the definition of `function-front`.

```yaml
apiVersion: core.openfunction.io/v1beta1
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-front
Expand Down Expand Up @@ -108,7 +108,7 @@ The custom content will send to the output named `target` in the `function-front
For sample function below, modify the ``spec.image`` field in ``function-front.yaml`` to your own container registry address:

```yaml
apiVersion: core.openfunction.io/v1beta1
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-sample
Expand Down
4 changes: 2 additions & 2 deletions functions/knative/multiple-functions-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ You can create this secret by editing the ``REGISTRY_SERVER``, ``REGISTRY_USER``
For sample function below, modify the ``spec.image`` field in ``function-sample.yaml`` to your own container registry address:

```yaml
apiVersion: core.openfunction.io/v1beta1
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-sample
Expand Down Expand Up @@ -145,4 +145,4 @@ You can create this secret by editing the ``REGISTRY_SERVER``, ``REGISTRY_USER``
curl http://serving-q6wdp-ksvc-wk6mv.default.<external-ip>.sslip.io/bar
hello, bar!
```
```
4 changes: 2 additions & 2 deletions functions/knative/path-parameters-function-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ You can create this secret by editing the ``REGISTRY_SERVER``, ``REGISTRY_USER``
For sample function below, modify the ``spec.image`` field in ``function-sample.yaml`` to your own container registry address:

```yaml
apiVersion: core.openfunction.io/v1beta1
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-sample
Expand Down Expand Up @@ -170,4 +170,4 @@ You can create this secret by editing the ``REGISTRY_SERVER``, ``REGISTRY_USER``
curl http://serving-gsx8g-ksvc-6fv9l.default.<external-ip>.sslip.io/hello/openfunction
{"hello":"openfunction"}%
```
```
2 changes: 1 addition & 1 deletion functions/knative/with-output-binding/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ kubectl apply -f ../../async/bindings/kafka-input/kafka-input.yaml
> The function plugin mechanism is also demonstrated in `function-front`, and you can observe the following configuration in the definition of `function-front`.
>
> ```yaml
> apiVersion: core.openfunction.io/v1beta1
> apiVersion: core.openfunction.io/v1beta2
> kind: Function
> metadata:
> name: function-front
Expand Down

0 comments on commit cbe6968

Please sign in to comment.