13
13
创建函数
14
14
15
15
``` shell
16
- kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/main /src/main/resources/functions/http-function.yaml
16
+ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/release-1.0 /src/main/resources/functions/http-function.yaml
17
17
```
18
18
19
19
访问函数
@@ -28,7 +28,7 @@ Hello, World!
28
28
创建函数
29
29
30
30
``` shell
31
- kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/main /src/main/resources/functions/function-front.yaml
31
+ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/release-1.0 /src/main/resources/functions/function-front.yaml
32
32
```
33
33
34
34
访问函数
@@ -64,7 +64,7 @@ plugin plugin-example:v1.0.0 exec post hook for http function at 2023-06-01 08:2
64
64
创建函数
65
65
66
66
``` shell
67
- kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/main /src/main/resources/functions/cloudevent-function.yaml
67
+ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/release-1.0 /src/main/resources/functions/cloudevent-function.yaml
68
68
```
69
69
70
70
访问函数
@@ -110,7 +110,7 @@ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/mai
110
110
创建函数
111
111
112
112
``` shell
113
- kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/main /src/main/resources/functions/kafka-input.yaml
113
+ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/release-1.0 /src/main/resources/functions/kafka-input.yaml
114
114
```
115
115
116
116
向 ` kafka ` 中发送数据
@@ -144,7 +144,7 @@ curl -d '{"message":"Awesome OpenFunction!"}' -H "Content-Type: application/json
144
144
创建函数
145
145
146
146
``` shell
147
- kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/main /src/main/resources/functions/cron-input-kafka-output.yaml
147
+ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/release-1.0 /src/main/resources/functions/cron-input-kafka-output.yaml
148
148
```
149
149
150
150
查看函数日志
@@ -178,7 +178,7 @@ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/samples/main/fun
178
178
创建 subscribe 函数
179
179
180
180
``` shell
181
- kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/main /src/main/resources/functions/function-subscriber.yaml
181
+ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/release-1.0 /src/main/resources/functions/function-subscriber.yaml
182
182
```
183
183
184
184
## 读取配置
210
210
部署 Function
211
211
212
212
``` shell
213
- kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/main /src/main/resources/functions/get-config-from-file.yaml
213
+ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/release-1.0 /src/main/resources/functions/get-config-from-file.yaml
214
214
```
215
215
216
216
### 从 configmap 读取配置
236
236
部署 Function
237
237
238
238
``` shell
239
- kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/main /src/main/resources/functions/get-config-from-configmap.yaml
239
+ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/release-1.0 /src/main/resources/functions/get-config-from-configmap.yaml
240
240
```
241
241
242
242
> 访问 k8s 资源需要创建对应的 servingaccount,role 和 rolebinding。
@@ -250,7 +250,7 @@ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/mai
250
250
部署 Function
251
251
252
252
``` shell
253
- kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/main /src/main/resources/functions/function-aggregation.yaml
253
+ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/release-1.0 /src/main/resources/functions/function-aggregation.yaml
254
254
```
255
255
256
256
PS: 需要修改 function 的spec.serving.params 中的 FUNCTIONS 字段的值为实际的 function的访问地址
@@ -262,7 +262,7 @@ PS: 需要修改 function 的spec.serving.params 中的 FUNCTIONS 字段的值
262
262
部署 Function
263
263
264
264
``` shell
265
- kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/main /src/main/resources/functions/redis-state-store.yaml
265
+ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/release-1.0 /src/main/resources/functions/redis-state-store.yaml
266
266
```
267
267
268
268
创建 state
@@ -317,7 +317,7 @@ delete 2 states
317
317
部署 Function
318
318
319
319
``` shell
320
- kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/main /src/main/resources/functions/mysql-state-store.yaml
320
+ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/release-1.0 /src/main/resources/functions/mysql-state-store.yaml
321
321
```
322
322
323
323
创建 state
@@ -372,7 +372,7 @@ delete 2 states
372
372
部署 Function
373
373
374
374
``` yaml
375
- kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/main /src/main/resources/functions/mysql-to-redis.yaml
375
+ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/release-1.0 /src/main/resources/functions/mysql-to-redis.yaml
376
376
```
377
377
378
378
PS:需要修改 mysql-to-redis.yaml 中以下环境变量
@@ -425,7 +425,7 @@ data:
425
425
部署函数
426
426
427
427
` ` ` shell
428
- kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/main /src/main/resources/functions/file-read-write.yaml
428
+ kubectl apply -f https://raw.githubusercontent.com/OpenFunction/java-samples/release-1.0 /src/main/resources/functions/file-read-write.yaml
429
429
```
430
430
431
431
创建文件
0 commit comments