-
Notifications
You must be signed in to change notification settings - Fork 183
/
Copy pathproducer-app-data-singlenode.yaml
69 lines (69 loc) · 1.52 KB
/
producer-app-data-singlenode.yaml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
apiVersion: v1
kind: Secret
metadata:
name: kafka-client-config
namespace: confluent
type: Opaque
data:
kafka.properties: Ym9vdHN0cmFwLnNlcnZlcnM9a2Fma2EuY29uZmx1ZW50LnN2Yy5jbHVzdGVyLmxvY2FsOjkwNzEKc2VjdXJpdHkucHJvdG9jb2w9UExBSU5URVhU
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: elastic
namespace: confluent
spec:
serviceName: elastic
podManagementPolicy: Parallel
replicas: 1
selector:
matchLabels:
app: elastic
template:
metadata:
labels:
app: elastic
spec:
containers:
- name: elastic
image: confluentinc/cp-kafka:latest
command:
- /bin/sh
- -c
- |
kafka-producer-perf-test \
--topic elastic-0 \
--record-size 64 \
--throughput 1 \
--producer.config /mnt/kafka.properties \
--num-records 230400
volumeMounts:
- name: kafka-properties
mountPath: /mnt
readOnly: true
resources:
requests:
memory: 512Mi # 768Mi
cpu: 500m # 1000m
volumes:
- name: kafka-properties # Create secret with name `kafka-client-config` with client configurations
secret:
secretName: kafka-client-config
---
apiVersion: v1
kind: Service
metadata:
name: elastic
spec:
clusterIP: None
---
apiVersion: platform.confluent.io/v1beta1
kind: KafkaTopic
metadata:
name: elastic-0
namespace: confluent
spec:
replicas: 1
partitionCount: 1
configs:
cleanup.policy: "delete"