uds5501 commented on code in PR #18413:
URL: https://github.com/apache/druid/pull/18413#discussion_r2296722313


##########
embedded-tests/src/test/java/org/apache/druid/testing/embedded/k8s/KubernetesClusterWithOperatorDockerTest.java:
##########
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.druid.testing.embedded.k8s;
+
+import org.apache.druid.testing.DruidCommand;
+import org.apache.druid.testing.embedded.EmbeddedDruidCluster;
+import org.apache.druid.testing.embedded.docker.LatestImageDockerTest;
+import org.apache.druid.testing.embedded.indexing.IngestionSmokeTest;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+
+/**
+ * Runs some basic ingestion tests against latest image Druid containers 
running
+ * on a K3s cluster with druid-operator.
+ */
+public class KubernetesClusterWithOperatorDockerTest extends 
IngestionSmokeTest implements LatestImageDockerTest
+{
+  private static final String MANIFEST_TEMPLATE = 
"manifests/druid-service-with-operator.yaml";
+
+  @Override
+  protected EmbeddedDruidCluster addServers(EmbeddedDruidCluster cluster)
+  {
+    final K3sDruidService brokerService = new 
K3sDruidService(DruidCommand.Server.BROKER)
+        .addProperty("druid.sql.planner.metadataRefreshPeriod", "PT1s")
+        .usingPort(30082);
+
+    final K3sDruidService overlordService = new 
K3sDruidService(DruidCommand.Server.OVERLORD)
+        .addProperty("druid.indexer.runner.type", "k8s")
+        .addProperty("druid.indexer.runner.namespace", "druid")
+        .addProperty("druid.indexer.runner.capacity", "4")
+        .usingPort(30090);
+
+    final K3sClusterResource k3sCluster = new K3sClusterWithOperatorResource()
+        .usingDruidTestImage()
+        .usingDruidManifestTemplate(MANIFEST_TEMPLATE)
+        .addService(new 
K3sDruidService(DruidCommand.Server.COORDINATOR).usingPort(30081))
+        .addService(overlordService)
+        .addService(new 
K3sDruidService(DruidCommand.Server.HISTORICAL).usingPort(30083))
+        .addService(new 
K3sDruidService(DruidCommand.Server.ROUTER).usingPort(30088))
+        .addService(brokerService);
+
+    // Add an EmbeddedOverlord and EmbeddedBroker to use their client and 
mapper bindings.

Review Comment:
   Yeah that's fair, adding them



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to