-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkafka-all.yaml
169 lines (160 loc) · 4.91 KB
/
kafka-all.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
static_resources:
listeners:
- name: meshlistener
address:
socket_address:
address: 127.0.0.1
port_value: 29092
filter_chains:
- filters:
- name: envoy.filters.network.kafka_broker
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.kafka_broker.v3.KafkaBroker
stat_prefix: mesh
- name: envoy.filters.network.kafka_mesh
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.kafka_mesh.v3alpha.KafkaMesh
advertised_host: "127.0.0.1"
advertised_port: 29092
upstream_clusters:
- cluster_name: kafka_c1
bootstrap_servers: 127.0.0.1:9492
partition_count: 1
- cluster_name: kafka_c2
bootstrap_servers: 127.0.0.1:9493
partition_count: 1
- cluster_name: kafka_c3
bootstrap_servers: 127.0.0.1:9494
partition_count: 5
producer_config:
acks: "1"
linger.ms: "500"
forwarding_rules:
- target_cluster: kafka_c1
topic_prefix: a
- target_cluster: kafka_c2
topic_prefix: b
- target_cluster: kafka_c3
topic_prefix: c
- name: brokerlistener1
stat_prefix: brokerlistener1
address:
socket_address:
address: 127.0.0.1
port_value: 19092
filter_chains:
- filters:
- name: envoy.filters.network.kafka_broker
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.kafka_broker.v3.KafkaBroker
stat_prefix: b1
id_based_broker_address_rewrite_spec: &broker_address_rewrite_rules
rules:
- id: 1
host: localhost
port: 19092
- id: 2
host: localhost
port: 19093
- id: 3
host: localhost
port: 19094
- name: envoy.filters.network.tcp_proxy
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy
stat_prefix: tcp
cluster: broker1
- name: brokerlistener2
stat_prefix: brokerlistener2
address:
socket_address:
address: 127.0.0.1
port_value: 19093
filter_chains:
- filters:
- name: envoy.filters.network.kafka_broker
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.kafka_broker.v3.KafkaBroker
stat_prefix: b2
id_based_broker_address_rewrite_spec: *broker_address_rewrite_rules
- name: envoy.filters.network.tcp_proxy
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy
stat_prefix: tcp
cluster: broker2
- name: brokerlistener3
stat_prefix: brokerlistener3
address:
socket_address:
address: 127.0.0.1
port_value: 19094
filter_chains:
- filters:
- name: envoy.filters.network.kafka_broker
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.kafka_broker.v3.KafkaBroker
stat_prefix: b3
id_based_broker_address_rewrite_spec: *broker_address_rewrite_rules
- name: envoy.filters.network.tcp_proxy
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy
stat_prefix: tcp
cluster: broker3
clusters:
- name: broker1
connect_timeout: 0.25s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: some_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 9092
- name: broker2
connect_timeout: 0.25s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: some_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 9093
- name: broker3
connect_timeout: 0.25s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: some_service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 9094
layered_runtime:
layers:
- name: static_layer_0
static_layer:
envoy:
resource_limits:
listener:
brokerlistener:
connection_limit: -1
meshlistener:
connection_limit: -1
overload:
global_downstream_max_connections: -1
admin:
access_log_path: /dev/null
profile_path: /dev/null
address:
socket_address: { address: 127.0.0.1, port_value: 9901 }