Skip to content

Commit fc6e178

Browse files
committed
more
1 parent 4446052 commit fc6e178

File tree

9 files changed

+805
-11
lines changed

9 files changed

+805
-11
lines changed

config/samples/kraft/simplekafkacluster_kraft_with_envoy.yaml

Lines changed: 195 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spec:
1212
oneBrokerPerNode: false
1313
clusterImage: "ghcr.io/adobe/koperator/kafka:2.13-3.9.1"
1414
ingressController: "envoy"
15-
kRaftMode: true
15+
kRaft: true
1616
readOnlyConfig: |
1717
auto.create.topics.enable=false
1818
cruise.control.metrics.topic.auto.create=true
@@ -35,17 +35,209 @@ spec:
3535
- id: 0
3636
brokerConfigGroup: "default"
3737
brokerConfig:
38-
roles:
38+
processRoles:
3939
- "broker"
4040
- "controller"
4141
- id: 2
4242
brokerConfigGroup: "default"
4343
brokerConfig:
44-
roles:
44+
processRoles:
4545
- "broker"
4646
- "controller"
4747
rollingUpgradeConfig:
4848
failureThreshold: 1
49+
cruiseControlConfig:
50+
cruiseControlTaskSpec:
51+
RetryDurationMinutes: 5
52+
topicConfig:
53+
partitions: 12
54+
replicationFactor: 3
55+
config: |
56+
# Copyright 2017 LinkedIn Corp. Licensed under the BSD 2-Clause License (the "License"). See License in the project root for license information.
57+
#
58+
# This is an example property file for Kafka Cruise Control. See KafkaCruiseControlConfig for more details.
59+
# Configuration for the metadata client.
60+
# =======================================
61+
# The maximum interval in milliseconds between two metadata refreshes.
62+
#metadata.max.age.ms=300000
63+
# Client id for the Cruise Control. It is used for the metadata client.
64+
#client.id=kafka-cruise-control
65+
# The size of TCP send buffer bytes for the metadata client.
66+
#send.buffer.bytes=131072
67+
# The size of TCP receive buffer size for the metadata client.
68+
#receive.buffer.bytes=131072
69+
# The time to wait before disconnect an idle TCP connection.
70+
#connections.max.idle.ms=540000
71+
# The time to wait before reconnect to a given host.
72+
#reconnect.backoff.ms=50
73+
# The time to wait for a response from a host after sending a request.
74+
#request.timeout.ms=30000
75+
# Configurations for the load monitor
76+
# =======================================
77+
# The number of metric fetcher thread to fetch metrics for the Kafka cluster
78+
num.metric.fetchers=1
79+
# The metric sampler class
80+
metric.sampler.class=com.linkedin.kafka.cruisecontrol.monitor.sampling.CruiseControlMetricsReporterSampler
81+
# Configurations for CruiseControlMetricsReporterSampler
82+
metric.reporter.topic.pattern=__CruiseControlMetrics
83+
# The sample store class name
84+
sample.store.class=com.linkedin.kafka.cruisecontrol.monitor.sampling.KafkaSampleStore
85+
# The config for the Kafka sample store to save the partition metric samples
86+
partition.metric.sample.store.topic=__KafkaCruiseControlPartitionMetricSamples
87+
# The config for the Kafka sample store to save the model training samples
88+
broker.metric.sample.store.topic=__KafkaCruiseControlModelTrainingSamples
89+
# The replication factor of Kafka metric sample store topic
90+
sample.store.topic.replication.factor=2
91+
# The config for the number of Kafka sample store consumer threads
92+
num.sample.loading.threads=8
93+
# The partition assignor class for the metric samplers
94+
metric.sampler.partition.assignor.class=com.linkedin.kafka.cruisecontrol.monitor.sampling.DefaultMetricSamplerPartitionAssignor
95+
# The metric sampling interval in milliseconds
96+
metric.sampling.interval.ms=120000
97+
metric.anomaly.detection.interval.ms=180000
98+
# The partition metrics window size in milliseconds
99+
partition.metrics.window.ms=300000
100+
# The number of partition metric windows to keep in memory
101+
num.partition.metrics.windows=1
102+
# The minimum partition metric samples required for a partition in each window
103+
min.samples.per.partition.metrics.window=1
104+
# The broker metrics window size in milliseconds
105+
broker.metrics.window.ms=300000
106+
# The number of broker metric windows to keep in memory
107+
num.broker.metrics.windows=20
108+
# The minimum broker metric samples required for a partition in each window
109+
min.samples.per.broker.metrics.window=1
110+
# The configuration for the BrokerCapacityConfigFileResolver (supports JBOD and non-JBOD broker capacities)
111+
capacity.config.file=config/capacity.json
112+
#capacity.config.file=config/capacityJBOD.json
113+
# Configurations for the analyzer
114+
# =======================================
115+
# The list of goals to optimize the Kafka cluster for with pre-computed proposals
116+
default.goals=com.linkedin.kafka.cruisecontrol.analyzer.goals.ReplicaCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.DiskCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.NetworkInboundCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.NetworkOutboundCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.CpuCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.ReplicaDistributionGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.PotentialNwOutGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.DiskUsageDistributionGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.NetworkInboundUsageDistributionGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.NetworkOutboundUsageDistributionGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.CpuUsageDistributionGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.TopicReplicaDistributionGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.LeaderBytesInDistributionGoal
117+
# The list of supported goals
118+
goals=com.linkedin.kafka.cruisecontrol.analyzer.goals.ReplicaCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.DiskCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.NetworkInboundCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.NetworkOutboundCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.CpuCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.ReplicaDistributionGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.PotentialNwOutGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.DiskUsageDistributionGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.NetworkInboundUsageDistributionGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.NetworkOutboundUsageDistributionGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.CpuUsageDistributionGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.TopicReplicaDistributionGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.LeaderBytesInDistributionGoal,com.linkedin.kafka.cruisecontrol.analyzer.kafkaassigner.KafkaAssignerDiskUsageDistributionGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.PreferredLeaderElectionGoal
119+
# The list of supported hard goals
120+
hard.goals=com.linkedin.kafka.cruisecontrol.analyzer.goals.ReplicaCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.DiskCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.NetworkInboundCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.NetworkOutboundCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.CpuCapacityGoal
121+
# The minimum percentage of well monitored partitions out of all the partitions
122+
min.monitored.partition.percentage=0.95
123+
# The balance threshold for CPU
124+
cpu.balance.threshold=1.1
125+
# The balance threshold for disk
126+
disk.balance.threshold=1.1
127+
# The balance threshold for network inbound utilization
128+
network.inbound.balance.threshold=1.1
129+
# The balance threshold for network outbound utilization
130+
network.outbound.balance.threshold=1.1
131+
# The balance threshold for the replica count
132+
replica.count.balance.threshold=1.1
133+
# The capacity threshold for CPU in percentage
134+
cpu.capacity.threshold=0.8
135+
# The capacity threshold for disk in percentage
136+
disk.capacity.threshold=0.8
137+
# The capacity threshold for network inbound utilization in percentage
138+
network.inbound.capacity.threshold=0.8
139+
# The capacity threshold for network outbound utilization in percentage
140+
network.outbound.capacity.threshold=0.8
141+
# The threshold to define the cluster to be in a low CPU utilization state
142+
cpu.low.utilization.threshold=0.0
143+
# The threshold to define the cluster to be in a low disk utilization state
144+
disk.low.utilization.threshold=0.0
145+
# The threshold to define the cluster to be in a low network inbound utilization state
146+
network.inbound.low.utilization.threshold=0.0
147+
# The threshold to define the cluster to be in a low disk utilization state
148+
network.outbound.low.utilization.threshold=0.0
149+
# The metric anomaly percentile upper threshold
150+
metric.anomaly.percentile.upper.threshold=90.0
151+
# The metric anomaly percentile lower threshold
152+
metric.anomaly.percentile.lower.threshold=10.0
153+
# How often should the cached proposal be expired and recalculated if necessary
154+
proposal.expiration.ms=60000
155+
# The maximum number of replicas that can reside on a broker at any given time.
156+
max.replicas.per.broker=10000
157+
# The number of threads to use for proposal candidate precomputing.
158+
num.proposal.precompute.threads=1
159+
# the topics that should be excluded from the partition movement.
160+
#topics.excluded.from.partition.movement
161+
# Configurations for the executor
162+
# =======================================
163+
# The max number of partitions to move in/out on a given broker at a given time.
164+
num.concurrent.partition.movements.per.broker=10
165+
# The interval between two execution progress checks.
166+
execution.progress.check.interval.ms=10000
167+
# Configurations for anomaly detector
168+
# =======================================
169+
# The goal violation notifier class
170+
anomaly.notifier.class=com.linkedin.kafka.cruisecontrol.detector.notifier.SelfHealingNotifier
171+
# The metric anomaly finder class
172+
metric.anomaly.finder.class=com.linkedin.kafka.cruisecontrol.detector.KafkaMetricAnomalyFinder
173+
# The anomaly detection interval
174+
anomaly.detection.interval.ms=10000
175+
# The goal violation to detect.
176+
anomaly.detection.goals=com.linkedin.kafka.cruisecontrol.analyzer.goals.ReplicaCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.DiskCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.NetworkInboundCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.NetworkOutboundCapacityGoal,com.linkedin.kafka.cruisecontrol.analyzer.goals.CpuCapacityGoal
177+
# The interested metrics for metric anomaly analyzer.
178+
metric.anomaly.analyzer.metrics=BROKER_PRODUCE_LOCAL_TIME_MS_MAX,BROKER_PRODUCE_LOCAL_TIME_MS_MEAN,BROKER_CONSUMER_FETCH_LOCAL_TIME_MS_MAX,BROKER_CONSUMER_FETCH_LOCAL_TIME_MS_MEAN,BROKER_FOLLOWER_FETCH_LOCAL_TIME_MS_MAX,BROKER_FOLLOWER_FETCH_LOCAL_TIME_MS_MEAN,BROKER_LOG_FLUSH_TIME_MS_MAX,BROKER_LOG_FLUSH_TIME_MS_MEAN
179+
## Adjust accordingly if your metrics reporter is an older version and does not produce these metrics.
180+
#metric.anomaly.analyzer.metrics=BROKER_PRODUCE_LOCAL_TIME_MS_50TH,BROKER_PRODUCE_LOCAL_TIME_MS_999TH,BROKER_CONSUMER_FETCH_LOCAL_TIME_MS_50TH,BROKER_CONSUMER_FETCH_LOCAL_TIME_MS_999TH,BROKER_FOLLOWER_FETCH_LOCAL_TIME_MS_50TH,BROKER_FOLLOWER_FETCH_LOCAL_TIME_MS_999TH,BROKER_LOG_FLUSH_TIME_MS_50TH,BROKER_LOG_FLUSH_TIME_MS_999TH
181+
# The cluster configurations for the KafkaTopicConfigProvider
182+
cluster.configs.file=config/clusterConfigs.json
183+
# The maximum time in milliseconds to store the response and access details of a completed user task.
184+
completed.user.task.retention.time.ms=21600000
185+
# The maximum time in milliseconds to retain the demotion history of brokers.
186+
demotion.history.retention.time.ms=86400000
187+
# The maximum number of completed user tasks for which the response and access details will be cached.
188+
max.cached.completed.user.tasks=500
189+
# The maximum number of user tasks for concurrently running in async endpoints across all users.
190+
max.active.user.tasks=25
191+
# Enable self healing for all anomaly detectors, unless the particular anomaly detector is explicitly disabled
192+
self.healing.enabled=true
193+
# Enable self healing for broker failure detector
194+
#self.healing.broker.failure.enabled=true
195+
# Enable self healing for goal violation detector
196+
#self.healing.goal.violation.enabled=true
197+
# Enable self healing for metric anomaly detector
198+
#self.healing.metric.anomaly.enabled=true
199+
# configurations for the webserver
200+
# ================================
201+
# HTTP listen port
202+
webserver.http.port=9090
203+
# HTTP listen address
204+
webserver.http.address=0.0.0.0
205+
# Whether CORS support is enabled for API or not
206+
webserver.http.cors.enabled=false
207+
# Value for Access-Control-Allow-Origin
208+
webserver.http.cors.origin=http://localhost:8080/
209+
# Value for Access-Control-Request-Method
210+
webserver.http.cors.allowmethods=OPTIONS,GET,POST
211+
# Headers that should be exposed to the Browser (Webapp)
212+
# This is a special header that is used by the
213+
# User Tasks subsystem and should be explicitly
214+
# Enabled when CORS mode is used as part of the
215+
# Admin Interface
216+
webserver.http.cors.exposeheaders=User-Task-ID
217+
# REST API default prefix
218+
# (dont forget the ending *)
219+
webserver.api.urlprefix=/kafkacruisecontrol/*
220+
# Location where the Cruise Control frontend is deployed
221+
webserver.ui.diskpath=./cruise-control-ui/dist/
222+
# URL path prefix for UI
223+
# (dont forget the ending *)
224+
webserver.ui.urlprefix=/*
225+
# Time After which request is converted to Async
226+
webserver.request.maxBlockTimeMs=10000
227+
# Default Session Expiry Period
228+
webserver.session.maxExpiryTimeMs=60000
229+
# Session cookie path
230+
webserver.session.path=/
231+
# Server Access Logs
232+
webserver.accesslog.enabled=true
233+
# Location of HTTP Request Logs
234+
webserver.accesslog.path=access.log
235+
# HTTP Request Log retention days
236+
webserver.accesslog.retention.days=14
237+
clusterConfig: |
238+
{
239+
"min.insync.replicas": 3
240+
}
49241
listenersConfig:
50242
internalListeners:
51243
- type: "plaintext"

0 commit comments

Comments
 (0)