File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -21,18 +21,28 @@ spec:
21
21
containers :
22
22
- name : kafkacat-curl
23
23
image : solsson/kafkacat-curl@sha256:6ad61f2e6343359c3972d7a86815568c0a1d0560068134c5d702a152eb5123a0
24
+ env :
25
+ - name : BOOTSTRAP
26
+ value : kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092
27
+ - name : TOPIC
28
+ value : ops-kube-events-all-json-001
24
29
command :
25
30
- /bin/bash
26
31
- -ec
32
+ # curl errors will go to kafka, kafkacat errors will got to log
27
33
- >
34
+ echo "Started at $(date -u +%FT%TZ) producing to $TOPIC"
35
+ ;
28
36
curl
29
37
-s
30
38
--cacert /run/secrets/kubernetes.io/serviceaccount/ca.crt
31
39
--header "Authorization: Bearer $(cat /run/secrets/kubernetes.io/serviceaccount/token)"
32
40
https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT/api/v1/watch/events
33
41
|
34
42
kafkacat
35
- -b kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092
36
- -t ops-kube-events-all-json-001
43
+ -b $BOOTSTRAP
44
+ -t $TOPIC
37
45
-P
38
46
-z snappy
47
+ -v
48
+ -d broker,topic
You can’t perform that action at this time.
0 commit comments