forked from GoogleCloudPlatform/functions-framework-java
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbinding-function.yaml
More file actions
57 lines (57 loc) · 1.5 KB
/
binding-function.yaml
File metadata and controls
57 lines (57 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
apiVersion: core.openfunction.io/v1beta1
kind: Function
metadata:
name: cron-input-kafka-output
spec:
version: "v2.0.0"
image: openfunctiondev/cron-input-kafka-output-java:v1
imageCredentials:
name: push-secret
build:
builder: openfunctiondev/builder-java:v2-11
env:
FUNC_NAME: "dev.openfunction.samples.OpenFunctionImpl"
FUNC_CLEAR_SOURCE: "true"
srcRepo:
url: "https://github.com/wanjunlei/functions-framework-java.git"
sourceSubPath: "samples"
revision: "java"
serving:
template:
containers:
- name: function # DO NOT change this
imagePullPolicy: IfNotPresent
outputs:
- name: kafka-server
type: bindings.kafka
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"
triggers:
dapr:
- name: cron
type: bindings.cron
hooks:
post:
- dev.openfunction.samples.hooks.ExampleHook
pre:
- dev.openfunction.samples.hooks.ExampleHook