From 1cc0a7b6ce76f85e1368b3841b45414618d44975 Mon Sep 17 00:00:00 2001 From: Jakub Stejskal Date: Tue, 5 Nov 2024 12:05:03 +0100 Subject: [PATCH] Rename SetupMinio to MinioInstaller Signed-off-by: Jakub Stejskal --- .../{SetupMinio.java => MinioInstaller.java} | 4 ++-- src/main/java/io/streams/utils/MinioUtils.java | 4 ++-- .../io/streams/e2e/flink/sql/SqlJobRunnerST.java | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) rename src/main/java/io/streams/operands/minio/{SetupMinio.java => MinioInstaller.java} (98%) diff --git a/src/main/java/io/streams/operands/minio/SetupMinio.java b/src/main/java/io/streams/operands/minio/MinioInstaller.java similarity index 98% rename from src/main/java/io/streams/operands/minio/SetupMinio.java rename to src/main/java/io/streams/operands/minio/MinioInstaller.java index 9637247..3f8ac6c 100644 --- a/src/main/java/io/streams/operands/minio/SetupMinio.java +++ b/src/main/java/io/streams/operands/minio/MinioInstaller.java @@ -21,8 +21,8 @@ import java.util.Map; -public class SetupMinio { - private static final Logger LOGGER = LogManager.getLogger(SetupMinio.class); +public class MinioInstaller { + private static final Logger LOGGER = LogManager.getLogger(MinioInstaller.class); public static final String MINIO = "minio"; public static final String ADMIN_CREDS = "minioadminLongerThan16BytesForFIPS"; diff --git a/src/main/java/io/streams/utils/MinioUtils.java b/src/main/java/io/streams/utils/MinioUtils.java index 00b7b5b..4f7437a 100644 --- a/src/main/java/io/streams/utils/MinioUtils.java +++ b/src/main/java/io/streams/utils/MinioUtils.java @@ -10,7 +10,7 @@ import io.skodjob.testframe.resources.KubeResourceManager; import io.skodjob.testframe.wait.Wait; import io.streams.constants.TestConstants; -import io.streams.operands.minio.SetupMinio; +import io.streams.operands.minio.MinioInstaller; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -34,7 +34,7 @@ private MinioUtils() { */ public static String getBucketSizeInfo(String namespace, String bucketName) { final LabelSelector labelSelector = new LabelSelectorBuilder() - .withMatchLabels(Map.of(TestConstants.APP_POD_LABEL, SetupMinio.MINIO)) + .withMatchLabels(Map.of(TestConstants.APP_POD_LABEL, MinioInstaller.MINIO)) .build(); final String minioPod = KubeResourceManager.getKubeClient() .listPods(namespace, labelSelector) diff --git a/src/test/java/io/streams/e2e/flink/sql/SqlJobRunnerST.java b/src/test/java/io/streams/e2e/flink/sql/SqlJobRunnerST.java index 00274ea..2405fe2 100644 --- a/src/test/java/io/streams/e2e/flink/sql/SqlJobRunnerST.java +++ b/src/test/java/io/streams/e2e/flink/sql/SqlJobRunnerST.java @@ -24,7 +24,7 @@ import io.streams.operands.flink.resoruces.FlinkDeploymentType; import io.streams.operands.flink.templates.FlinkDeploymentTemplate; import io.streams.operands.flink.templates.FlinkRBAC; -import io.streams.operands.minio.SetupMinio; +import io.streams.operands.minio.MinioInstaller; import io.streams.operands.strimzi.resources.KafkaType; import io.streams.operands.strimzi.templates.KafkaNodePoolTemplate; import io.streams.operands.strimzi.templates.KafkaTemplate; @@ -716,8 +716,8 @@ void testS3StateBackend() { String registryUrl = "http://apicurio-registry-service." + namespace + ".svc:8080/apis/ccompat/v6"; // Add Minio - SetupMinio.deployMinio(namespace); - SetupMinio.createBucket(namespace, bucketName); + MinioInstaller.deployMinio(namespace); + MinioInstaller.createBucket(namespace, bucketName); // Deploy flink with test filter sql statement which filter to specific topic only payment type paypal // Modify flink default deployment with state backend and pvc configuration @@ -727,14 +727,14 @@ void testS3StateBackend() { flinkConfig.put("kubernetes.operator.job.restart.failed", "true"); // rocksdb can be used as a state backend but the location is referenced in s3 instead on local pvc flinkConfig.put("state.backend", "rocksdb"); - flinkConfig.put("state.checkpoints.dir", "s3://" + bucketName + "/" + SetupMinio.MINIO + ":" + SetupMinio.MINIO_PORT); - flinkConfig.put("state.savepoints.dir", "s3://" + bucketName + "/" + SetupMinio.MINIO + ":" + SetupMinio.MINIO_PORT); + flinkConfig.put("state.checkpoints.dir", "s3://" + bucketName + "/" + MinioInstaller.MINIO + ":" + MinioInstaller.MINIO_PORT); + flinkConfig.put("state.savepoints.dir", "s3://" + bucketName + "/" + MinioInstaller.MINIO + ":" + MinioInstaller.MINIO_PORT); // Currently Minio is deployed only in HTTP mode so we need to specify http in the url - flinkConfig.put("s3.endpoint", "http://" + SetupMinio.MINIO + ":" + SetupMinio.MINIO_PORT); + flinkConfig.put("s3.endpoint", "http://" + MinioInstaller.MINIO + ":" + MinioInstaller.MINIO_PORT); // This should be set to make sure Flink will properly work with Minio flinkConfig.put("s3.path.style.access", "true"); - flinkConfig.put("s3.access-key", SetupMinio.ADMIN_CREDS); - flinkConfig.put("s3.secret-key", SetupMinio.ADMIN_CREDS); + flinkConfig.put("s3.access-key", MinioInstaller.ADMIN_CREDS); + flinkConfig.put("s3.secret-key", MinioInstaller.ADMIN_CREDS); FlinkDeployment flink = FlinkDeploymentTemplate.defaultFlinkDeployment(namespace, flinkDeploymentName, List.of(TestStatements.getTestFlinkFilter(