Skip to content

Commit ccfa98c

Browse files
owentherealknative-prow-robot
authored andcommitted
Update container source documentation with template field (#1491)
knative/eventing#1321 introduces `PodTemplateSpec` to `ContainerSourceSpec`. This feature will be out in 0.7.x. Update documentation to reflect the `template` field.
1 parent 6bbafd5 commit ccfa98c

File tree

2 files changed

+26
-18
lines changed

2 files changed

+26
-18
lines changed

docs/eventing/samples/container-source/README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,22 @@ kind: ContainerSource
7171
metadata:
7272
name: test-heartbeats
7373
spec:
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

8892
Use the following command to create the event source from

docs/eventing/samples/container-source/heartbeats-source.yaml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@ kind: ContainerSource
33
metadata:
44
name: test-heartbeats
55
spec:
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"

0 commit comments

Comments
 (0)