Skip to content

Commit

Permalink
Rename SetupMinio to MinioInstaller
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Stejskal <[email protected]>
  • Loading branch information
Frawless committed Nov 5, 2024
1 parent a674caa commit 1cc0a7b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/streams/utils/MinioUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions src/test/java/io/streams/e2e/flink/sql/SqlJobRunnerST.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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(
Expand Down

0 comments on commit 1cc0a7b

Please sign in to comment.