File tree Expand file tree Collapse file tree 2 files changed +26
-18
lines changed
docs/eventing/samples/container-source Expand file tree Collapse file tree 2 files changed +26
-18
lines changed Original file line number Diff line number Diff line change @@ -71,18 +71,22 @@ kind: ContainerSource
7171metadata:
7272 name: test-heartbeats
7373spec:
74- image: <heartbeats_image_uri>
74+ template:
75+ spec:
76+ containers:
77+ - image: <heartbeats_image_uri>
78+ name: heartbeats
79+ args:
80+ - --period=1
81+ env:
82+ - name: POD_NAME
83+ value: "mypod"
84+ - name: POD_NAMESPACE
85+ value: "event-test"
7586 sink:
7687 apiVersion: serving.knative.dev/v1beta1
7788 kind: Service
7889 name: event-display
79- args:
80- - --period=1
81- env:
82- - name: POD_NAME
83- value: "mypod"
84- - name: POD_NAMESPACE
85- value: "event-test"
8690` ` `
8791
8892Use the following command to create the event source from
Original file line number Diff line number Diff line change @@ -3,17 +3,21 @@ kind: ContainerSource
33metadata :
44 name : test-heartbeats
55spec :
6- # This corresponds to a heartbeats image uri you build and publish,
7- # e.g. gcr.io/[gcloud-project]/github.com/knative/eventing-contrib/cmd/heartbeats
8- image : index.docker.io/daisyycguo/heartbeats-6790335e994243a8d3f53b967cdd6398
9- args :
10- - --period=1
6+ template :
7+ spec :
8+ containers :
9+ # This corresponds to a heartbeats image uri you build and publish,
10+ # e.g. gcr.io/[gcloud-project]/github.com/knative/eventing-contrib/cmd/heartbeats
11+ - image : github.com/knative/eventing-contrib/cmd/heartbeats
12+ name : heartbeats
13+ args :
14+ - --period=1
15+ env :
16+ - name : POD_NAME
17+ value : " mypod"
18+ - name : POD_NAMESPACE
19+ value : " event-test"
1120 sink :
1221 apiVersion : serving.knative.dev/v1beta1
1322 kind : Service
1423 name : event-display
15- env :
16- - name : POD_NAME
17- value : " mypod"
18- - name : POD_NAMESPACE
19- value : " event-test"
You can’t perform that action at this time.
0 commit comments