Skip to content

Commit

Permalink
Add RackAwareDistributionGoal to CC goal config by default
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Liberti <[email protected]>
  • Loading branch information
kyguy committed Jul 12, 2024
1 parent e5d158c commit a7f5ff8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class CruiseControlConfiguration extends AbstractConfiguration {
*/
protected static final List<String> CRUISE_CONTROL_GOALS_LIST = List.of(
CruiseControlGoals.RACK_AWARENESS_GOAL.toString(),
CruiseControlGoals.RACK_AWARENESS_DISTRIBUTION_GOAL.toString(),
CruiseControlGoals.MIN_TOPIC_LEADERS_PER_BROKER_GOAL.toString(),
CruiseControlGoals.REPLICA_CAPACITY_GOAL.toString(),
CruiseControlGoals.DISK_CAPACITY_GOAL.toString(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public void reconcileEnabledCruiseControl(boolean topicOperatorEnabled, VertxTes
assertThat(deployCaptor.getValue(), is(notNullValue()));
assertThat(deployCaptor.getValue().getSpec().getTemplate().getMetadata().getAnnotations().get(Ca.ANNO_STRIMZI_IO_CLUSTER_CA_CERT_GENERATION), is("0"));
assertThat(deployCaptor.getValue().getSpec().getTemplate().getMetadata().getAnnotations().get(Ca.ANNO_STRIMZI_IO_CLUSTER_CA_KEY_GENERATION), is("0"));
assertThat(deployCaptor.getAllValues().get(0).getSpec().getTemplate().getMetadata().getAnnotations().get(CruiseControl.ANNO_STRIMZI_SERVER_CONFIGURATION_HASH), is("096591fb"));
assertThat(deployCaptor.getAllValues().get(0).getSpec().getTemplate().getMetadata().getAnnotations().get(CruiseControl.ANNO_STRIMZI_SERVER_CONFIGURATION_HASH), is("4b8f68dd"));
assertThat(deployCaptor.getAllValues().get(0).getSpec().getTemplate().getMetadata().getAnnotations().get(CruiseControl.ANNO_STRIMZI_CAPACITY_CONFIGURATION_HASH), is("1eb49220"));
assertThat(deployCaptor.getValue().getSpec().getTemplate().getMetadata().getAnnotations().get(Annotations.ANNO_STRIMZI_SERVER_CERT_HASH), is("4d715cdd"));
if (topicOperatorEnabled) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Strimzi supports most of the optimization goals developed in the Cruise Control
The supported goals, in the default descending order of priority, are as follows:

. Rack-awareness
* Rack-awareness distribution
. Minimum number of leader replicas per broker for a set of topics
. Replica capacity
. Capacity goals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ public enum CruiseControlGoals {
*/
RACK_AWARENESS_GOAL("com.linkedin.kafka.cruisecontrol.analyzer.goals.RackAwareGoal"),

/**
* Rack aware distribution goal
*/
RACK_AWARENESS_DISTRIBUTION_GOAL("com.linkedin.kafka.cruisecontrol.analyzer.goals.RackAwareDistributionGoal"),

/**
* Minimum topic leaders per broker goal
*/
Expand Down

0 comments on commit a7f5ff8

Please sign in to comment.