forked from headlamp-k8s/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublisher-job.yaml
More file actions
30 lines (30 loc) · 908 Bytes
/
publisher-job.yaml
File metadata and controls
30 lines (30 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
apiVersion: batch/v1
kind: Job
metadata:
name: message-publisher-job
spec:
template:
spec:
containers:
- name: publisher
image: some-registry/keda-message-consumer:latest
imagePullPolicy: Always
env:
- name: RABBITMQ_CONNECTION
valueFrom:
secretKeyRef:
name: queue-connection-secrets
key: RABBITMQ_CONNECTION_STRING
- name: REDIS_CONNECTION
valueFrom:
secretKeyRef:
name: queue-connection-secrets
key: REDIS_CONNECTION_STRING
command: ['publish']
args:
- '$(RABBITMQ_CONNECTION)'
- '$(REDIS_CONNECTION)'
- '300' # Publish 300 messages to RabbitMQ
- '500' # Publish 500 messages to Redis
restartPolicy: Never
backoffLimit: 4