Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docs/eventing/samples/helloworld/helloworld-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,13 @@ cd knative-docs/docs/eventing/samples/helloworld/helloworld-go
metadata:
name: default
namespace: knative-samples
annotations:
# Note: you can set the eventing.knative.dev/broker.class annotation to change the class of the broker.
# The default broker class is MTChannelBasedBroker, but Knative also supports use of the other class.
eventing.knative.dev/broker.class: MTChannelBasedBroker
spec: {}
---
# Helloworld-go app deploment
# Helloworld-go app deployment
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -303,7 +307,7 @@ with correct CloudEvent headers set.
-X POST \
-H "Ce-Id: 536808d3-88be-4077-9d7a-a3f162705f79" \
-H "Ce-Specversion: 1.0" \
-H "Ce-Type: dev.knative.samples.helloworld" \
-H "Ce-Type: dev.knative.samples.hifromknative" \
-H "Ce-Source: dev.knative.samples/helloworldsource" \
-H "Content-Type: application/json" \
-d '{"msg":"Hello World from the curl pod."}'
Expand Down Expand Up @@ -427,7 +431,7 @@ mesh via the Broker and can be delivered to other services using a Trigger
EOF
```

1. [Send a CloudEvent to the Broker](#send-cloudevent-to-the-broker)
1. [Send a CloudEvent to the Broker](#send-and-verify-cloudevents)

1. Check the logs of `event-display` service:

Expand Down
22 changes: 13 additions & 9 deletions docs/eventing/samples/helloworld/helloworld-go/sample-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ kind: Broker
metadata:
name: default
namespace: knative-samples
annotations:
# Note: you can set the eventing.knative.dev/broker.class annotation to change the class of the broker.
# The default broker class is MTChannelBasedBroker, but Knative also supports use of the other class.
eventing.knative.dev/broker.class: MTChannelBasedBroker
spec: {}
---
# Helloworld-go app deployment
Expand All @@ -33,15 +37,15 @@ spec:
---
# Service that exposes helloworld-go app.
# This will be the subscriber for the Trigger
kind: Service
apiVersion: v1
metadata:
name: helloworld-go
namespace: knative-samples
spec:
selector:
app: helloworld-go
ports:
apiVersion: v1
kind: Service
metadata:
name: helloworld-go
namespace: knative-samples
spec:
selector:
app: helloworld-go
ports:
- protocol: TCP
port: 80
targetPort: 8080
Expand Down
42 changes: 27 additions & 15 deletions docs/eventing/samples/helloworld/helloworld-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,19 @@ cd knative-docs/docs/eventing/samples/helloworld/helloworld-python
labels:
eventing.knative.dev/injection: enabled
---
# Helloworld-python app deploment
# A default broker
apiVersion: eventing.knative.dev/v1
kind: Broker
metadata:
name: default
namespace: knative-samples
Comment thread
novahe marked this conversation as resolved.
annotations:
# Note: you can set the eventing.knative.dev/broker.class annotation to change the class of the broker.
# The default broker class is MTChannelBasedBroker, but Knative also supports use of the other class.
eventing.knative.dev/broker.class: MTChannelBasedBroker
spec: {}
---
# Helloworld-python app deployment
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -109,18 +121,18 @@ cd knative-docs/docs/eventing/samples/helloworld/helloworld-python
---
# Service that exposes helloworld-python app.
# This will be the subscriber for the Trigger
kind: Service
apiVersion: v1
metadata:
name: helloworld-python
namespace: knative-samples
spec:
selector:
app: helloworld-python
ports:
- protocol: TCP
port: 80
targetPort: 8080
apiVersion: v1
kind: Service
metadata:
name: helloworld-python
namespace: knative-samples
spec:
selector:
app: helloworld-python
ports:
- protocol: TCP
port: 80
targetPort: 8080
---
# Knative Eventing Trigger to trigger the helloworld-python service
apiVersion: eventing.knative.dev/v1
Expand Down Expand Up @@ -198,7 +210,7 @@ You can send an HTTP request directly to the Knative [broker](../../../broker) i
1. Run the following command in the SSH terminal:

```bash
curl -v "default-broker.knative-samples.svc.cluster.local" \
curl -v "broker-ingress.knative-eventing.svc.cluster.local/knative-samples/default" \
-X POST \
-H "Ce-Id: 536808d3-88be-4077-9d7a-a3f162705f79" \
-H "Ce-specversion: 0.3" \
Expand Down Expand Up @@ -310,7 +322,7 @@ The `helloworld-python` app replies with an event type `type= dev.knative.sample
EOF
```

1. [Send a CloudEvent to the Broker](#send-cloudevent-to-the-broker)
1. [Send a CloudEvent to the Broker](#send-and-verify-cloudevents)

1. Check the logs of `event-display` Service:

Expand Down
40 changes: 26 additions & 14 deletions docs/eventing/samples/helloworld/helloworld-python/sample-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@ kind: Namespace
metadata:
name: knative-samples
labels:
eventing.knative.dev/injection: enabled
eventing.knative.dev/injection: enabled
---
# Helloworld-go app deploment
# A default broker
apiVersion: eventing.knative.dev/v1
kind: Broker
metadata:
name: default
namespace: knative-samples
annotations:
# Note: you can set the eventing.knative.dev/broker.class annotation to change the class of the broker.
# The default broker class is MTChannelBasedBroker, but Knative also supports use of the other class.
eventing.knative.dev/broker.class: MTChannelBasedBroker
spec: {}
---
# helloworld-python app deployment
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -23,25 +35,25 @@ spec:
spec:
containers:
- name: helloworld-python
image: docker.io/axsauze/helloworld-python
image: docker.io/{username}/helloworld-python
imagePullPolicy: IfNotPresent
---
# Service that exposes helloworld-go app.
# Service that exposes helloworld-python app.
# This will be the subscriber for the Trigger
kind: Service
apiVersion: v1
metadata:
name: helloworld-python
namespace: knative-samples
spec:
selector:
app: helloworld-python
ports:
apiVersion: v1
kind: Service
metadata:
name: helloworld-python
namespace: knative-samples
spec:
selector:
app: helloworld-python
ports:
- protocol: TCP
port: 80
targetPort: 8080
---
# Knative Eventing Trigger to trigger the helloworld-go service
# Knative Eventing Trigger to trigger the helloworld-python service
apiVersion: eventing.knative.dev/v1
kind: Trigger
metadata:
Expand Down