Skip to content

Commit

Permalink
Minor fixes in the Entity Operator model classes
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Scholz <www@scholzj.com>
  • Loading branch information
scholzj committed May 23, 2024
1 parent bd8f6a5 commit f0a1965
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
/**
* Represents the Entity Operator deployment
*/
@SuppressWarnings({"checkstyle:CyclomaticComplexity", "checkstyle:NPathComplexity"})
public class EntityOperator extends AbstractModel {
protected static final String COMPONENT_TYPE = "entity-operator";
// Certificates for the Entity Topic Operator
Expand All @@ -70,7 +69,6 @@ public class EntityOperator extends AbstractModel {
*/
protected static final Probe DEFAULT_HEALTHCHECK_OPTIONS = new io.strimzi.api.kafka.model.common.ProbeBuilder().withTimeoutSeconds(5).withInitialDelaySeconds(10).build();

/* test */ String zookeeperConnect;
private EntityTopicOperator topicOperator;
private EntityUserOperator userOperator;
/* test */ boolean cruiseControlEnabled;
Expand All @@ -96,8 +94,6 @@ public class EntityOperator extends AbstractModel {
*/
protected EntityOperator(Reconciliation reconciliation, HasMetadata resource, SharedEnvironmentProvider sharedEnvironmentProvider) {
super(reconciliation, resource, KafkaResources.entityOperatorDeploymentName(resource.getMetadata().getName()), COMPONENT_TYPE, sharedEnvironmentProvider);

this.zookeeperConnect = KafkaResources.zookeeperServiceName(cluster) + ":" + ZookeeperCluster.CLIENT_TLS_PORT;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ public class EntityTopicOperator extends AbstractModel implements SupportsLoggin
/* test */ static final String ENV_VAR_CRUISE_CONTROL_AUTH_ENABLED = "STRIMZI_CRUISE_CONTROL_AUTH_ENABLED";

// Kafka bootstrap servers can't be specified in the JSON
/* test */ String kafkaBootstrapServers;
/* test */ final String kafkaBootstrapServers;
private boolean cruiseControlEnabled;
private boolean rackAwarenessEnabled;
private String featureGatesEnvVarValue;

private String watchedNamespace;
/* test */ int reconciliationIntervalMs;
/* test */ String resourceLabels;
/* test */ final String resourceLabels;
private ResourceTemplate templateRoleBinding;

private LoggingModel logging;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ public class EntityUserOperator extends AbstractModel implements SupportsLogging
// Because the container shares the pod with other containers, it needs to have unique name
/*test*/ static final String USER_OPERATOR_TMP_DIRECTORY_DEFAULT_VOLUME_NAME = "strimzi-uo-tmp";

/* test */ String kafkaBootstrapServers;
/* test */ final String kafkaBootstrapServers;
private String watchedNamespace;
/* test */ String resourceLabels;
private String resourceLabels;
/* test */ String secretPrefix;
/* test */ long reconciliationIntervalMs;
/* test */ int clientsCaValidityDays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ public void testGenerateDeployment(boolean cruiseControlEnabled) {
public void testFromCrd() {
assertThat(entityOperator.namespace, is(namespace));
assertThat(entityOperator.cluster, is(cluster));
assertThat(entityOperator.zookeeperConnect, is(KafkaResources.zookeeperServiceName(cluster) + ":" + ZookeeperCluster.CLIENT_TLS_PORT));
}

@ParallelTest
Expand Down Expand Up @@ -221,9 +220,6 @@ public void testTemplate() {
Map<String, String> rLabels = TestUtils.map("l7", "v7", "l8", "v8");
Map<String, String> rAnots = TestUtils.map("a7", "v7", "a8", "v8");

Map<String, String> rbLabels = TestUtils.map("l9", "v9", "l10", "v10");
Map<String, String> rbAnots = TestUtils.map("a9", "v9", "a10", "v10");

Toleration toleration = new TolerationBuilder()
.withEffect("NoSchedule")
.withValue("")
Expand Down

0 comments on commit f0a1965

Please sign in to comment.