mirror of https://github.com/knative/docs.git
sample-app: Use hardcoded URL as db-insert trigger subscriber
This is needed because the node-server service listens on port 8080, and
the K8s ref resolver doesn't support custom ports [1], and referring to
the node-server-svc service yields:
http://node-server-svc.default.svc.cluster.local/insert
Instead of the correct URL:
http://node-server-svc.default.svc.cluster.local:8080/insert
Which results in hanging connections and eventually timeouts when adding
new comments that pass the trigger's filter.
[1] dcf159339d/resolver/addressable_resolver.go (L227)
Signed-off-by: Guzman <guzman@guzman.fi>
This commit is contained in:
parent
2dca1810bf
commit
865ca51a33
|
@ -15,8 +15,4 @@ spec:
|
|||
type: moderated-comment # This is the filter that will be applied to the event, only events with the ce-type moderated-comment will be processed
|
||||
badwordfilter: good # This is the filter that will be applied to the event, only events with the ce-extension badwordfilter: good will be processed
|
||||
subscriber:
|
||||
ref:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
name: node-server-svc
|
||||
uri: /insert # This is the path where the event will be sent to the subscriber, see /insert in node-server code: index.js
|
||||
uri: http://node-server-svc.default.svc.cluster.local:8080/insert # This is the path where the event will be sent to the subscriber, see /insert in node-server code: index.js
|
||||
|
|
|
@ -43,11 +43,7 @@ Append the following Trigger configuration to the existing `node-server/config/2
|
|||
type: moderated-comment # This is the filter that will be applied to the event, only events with the ce-type moderated-comment will be processed
|
||||
badwordfilter: good # This is the filter that will be applied to the event, only events with the ce-extension badwordfilter: good will be processed
|
||||
subscriber:
|
||||
ref:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
name: node-server-svc
|
||||
uri: /insert # This is the path where the event will be sent to the subscriber, see /insert in node-server code: index.js
|
||||
uri: http://node-server-svc.default.svc.cluster.local:8080/insert # This is the path where the event will be sent to the subscriber, see /insert in node-server code: index.js
|
||||
```
|
||||
|
||||
```shell
|
||||
|
|
Loading…
Reference in New Issue