Skip to content

Commit

Permalink
Fixed scholzj and fvaleri feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Patierno <[email protected]>
  • Loading branch information
ppatierno committed Jan 21, 2025
1 parent dd2a873 commit 1c964e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
* The storage overrides for configuring per-broker storage class are not supported anymore.
If you are using the storage overrides, you should instead use multiple KafkaNodePool resources with a different storage class each.
For more details about migrating from storage overrides, please follow the [documentation](https://strimzi.io/docs/operators/0.45.0/full/deploying.html#con-config-storage-zookeeper-str).
* Because of the corresponding configuration changes, the 0.32.0 is the minimum HTTP bridge release working with the Strimzi operator 0.46.0.
* If you have an Apache Kafka cluster running together with an HTTP bridge instance, please upgrade the bridge after upgrading the operator.

## 0.45.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
import static java.util.Collections.singletonMap;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
Expand Down Expand Up @@ -271,11 +270,6 @@ public void testGenerateDeploymentWithTls() {
assertThat(containers.get(0).getVolumeMounts().get(3).getMountPath(), is(KafkaBridgeCluster.TLS_CERTS_BASE_VOLUME_MOUNT + "my-another-secret"));

assertThat(io.strimzi.operator.cluster.TestUtils.containerEnvVars(containers.get(0)).get(KafkaBridgeCluster.ENV_VAR_KAFKA_BRIDGE_TRUSTED_CERTS), is("my-secret/cert.crt;my-secret/new-cert.crt;my-another-secret/another-cert.crt"));

ConfigMap configMap = kbc.generateBridgeConfigMap(metricsAndLogging);
assertThat(configMap.getData().get(KafkaBridgeCluster.BRIDGE_CONFIGURATION_FILENAME), containsString("kafka.ssl.truststore."));
assertThat(configMap.getData().get(KafkaBridgeCluster.BRIDGE_CONFIGURATION_FILENAME), not(containsString("kafka.ssl.keystore.")));
assertThat(configMap.getData().get(KafkaBridgeCluster.BRIDGE_CONFIGURATION_FILENAME), containsString("kafka.security.protocol=SSL"));
}

@ParallelTest
Expand Down Expand Up @@ -306,11 +300,6 @@ public void testGenerateDeploymentWithTlsAuth() {

assertThat(io.strimzi.operator.cluster.TestUtils.containerEnvVars(containers.get(0)).get(ENV_VAR_KAFKA_BRIDGE_TLS_AUTH_CERT), is("user-secret/user.crt"));
assertThat(io.strimzi.operator.cluster.TestUtils.containerEnvVars(containers.get(0)).get(ENV_VAR_KAFKA_BRIDGE_TLS_AUTH_KEY), is("user-secret/user.key"));

ConfigMap configMap = kbc.generateBridgeConfigMap(metricsAndLogging);
assertThat(configMap.getData().get(KafkaBridgeCluster.BRIDGE_CONFIGURATION_FILENAME), containsString("kafka.ssl.truststore."));
assertThat(configMap.getData().get(KafkaBridgeCluster.BRIDGE_CONFIGURATION_FILENAME), containsString("kafka.ssl.keystore."));
assertThat(configMap.getData().get(KafkaBridgeCluster.BRIDGE_CONFIGURATION_FILENAME), containsString("kafka.security.protocol=SSL"));
}

@ParallelTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public void testCreateOrUpdateCreatesCluster(VertxTestContext context) {
assertThat(dc.getMetadata().getName(), is(bridge.getComponentName()));
assertThat(dc, is(bridge.generateDeployment(Map.of(
Annotations.ANNO_STRIMZI_AUTH_HASH, "0",
KafkaBridgeCluster.ANNO_STRIMZI_IO_CONFIGURATION_HASH, Util.hashStub(cm.getData().get(KafkaBridgeCluster.BRIDGE_CONFIGURATION_FILENAME))
KafkaBridgeCluster.ANNO_STRIMZI_IO_CONFIGURATION_HASH, "0ff4f460"
), true, null, null)));

// Verify PodDisruptionBudget
Expand Down Expand Up @@ -347,7 +347,7 @@ public void testCreateOrUpdateUpdatesCluster(VertxTestContext context) {
assertThat(dc.getMetadata().getName(), is(compareTo.getComponentName()));
assertThat(dc, is(compareTo.generateDeployment(Map.of(
Annotations.ANNO_STRIMZI_AUTH_HASH, "0",
KafkaBridgeCluster.ANNO_STRIMZI_IO_CONFIGURATION_HASH, Util.hashStub(cm.getData().get(KafkaBridgeCluster.BRIDGE_CONFIGURATION_FILENAME))
KafkaBridgeCluster.ANNO_STRIMZI_IO_CONFIGURATION_HASH, "0ff4f460"
), true, null, null)));

// Verify PodDisruptionBudget
Expand Down

0 comments on commit 1c964e1

Please sign in to comment.