Adds support for message queue triggers based on the NATS-Streaming message queue. This lets the user map a queue topic to a function, and optionally send the function's response into another queue topic. The message queue trigger manager is designed to be message queue independent, so we should be able add support for more queues by adding implementations for the relatively simple mqtrigger.MessageQueue interface.
61 lines
1.3 KiB
YAML
61 lines
1.3 KiB
YAML
# To enable nats authentication, please follow the instruction described in
|
|
# http://nats.io/documentation/server/gnatsd-authentication/.
|
|
# And dont forget to change the MESSAGE_QUEUE_URL in mqtrigger deployment.
|
|
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: mqtrigger
|
|
namespace: fission
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
svc: mqtrigger
|
|
spec:
|
|
containers:
|
|
- name: mqtrigger
|
|
image: fission/fission-bundle
|
|
command: ["/fission-bundle"]
|
|
args: ["--mqt"]
|
|
env:
|
|
- name: MESSAGE_QUEUE_TYPE
|
|
value: nats-streaming
|
|
- name: MESSAGE_QUEUE_URL
|
|
value: nats://nats-streaming:4222
|
|
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
svc: nats-streaming
|
|
name: nats-streaming
|
|
namespace: fission
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
svc: nats-streaming
|
|
strategy:
|
|
rollingUpdate:
|
|
maxSurge: 1
|
|
maxUnavailable: 1
|
|
type: RollingUpdate
|
|
template:
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
svc: nats-streaming
|
|
spec:
|
|
containers:
|
|
- name: nats-streaming
|
|
image: nats-streaming
|
|
args: ["--cluster_id", "fissionMQTrigger"]
|
|
ports:
|
|
- containerPort: 4222
|
|
hostPort: 4222
|
|
protocol: TCP
|
|
|