diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Action.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Action.kt similarity index 87% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Action.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Action.kt index ea4a94eb41f8a4d75856029e23de8e0cb478a874..773de8d438bd1219bd308138836e3aad86ac8b3f 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Action.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Action.kt @@ -1,11 +1,9 @@ -package rocks.theodolite.kubernetes.benchmark +package rocks.theodolite.kubernetes import com.fasterxml.jackson.annotation.JsonInclude import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.quarkus.runtime.annotations.RegisterForReflection -import rocks.theodolite.kubernetes.util.Configuration -import rocks.theodolite.kubernetes.util.exception.ActionCommandFailedException @JsonDeserialize diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/ActionCommand.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ActionCommand.kt similarity index 97% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/ActionCommand.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ActionCommand.kt index b46b2bc3fd6041d69f6f7fea7798ca89a9b76726..72cfd30a223058063ee2f2077feb28d781a950b1 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/ActionCommand.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ActionCommand.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.benchmark +package rocks.theodolite.kubernetes import io.fabric8.kubernetes.api.model.Status import io.fabric8.kubernetes.client.KubernetesClientException @@ -7,8 +7,6 @@ import io.fabric8.kubernetes.client.dsl.ExecListener import io.fabric8.kubernetes.client.dsl.ExecWatch import io.fabric8.kubernetes.client.utils.Serialization import mu.KotlinLogging -import rocks.theodolite.kubernetes.util.Configuration -import rocks.theodolite.kubernetes.util.exception.ActionCommandFailedException import java.io.ByteArrayOutputStream import java.time.Duration import java.util.concurrent.CountDownLatch diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/ActionCommandFailedException.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ActionCommandFailedException.kt similarity index 69% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/ActionCommandFailedException.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ActionCommandFailedException.kt index a2292837835aa9da288572f79a464eec8d54ece7..8472b0cc9b46a952dbeb14eb73093c821cd6ed57 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/ActionCommandFailedException.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ActionCommandFailedException.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.util.exception +package rocks.theodolite.kubernetes class ActionCommandFailedException(message: String, e: Exception? = null) : DeploymentFailedException(message,e) { } \ No newline at end of file diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/BenchmarkDeployment.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/BenchmarkDeployment.kt similarity index 92% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/BenchmarkDeployment.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/BenchmarkDeployment.kt index 0281726b9f771b81c499dc6c400c94b32377496c..df303b3b85175d6133e8bc9e7a2748cf8c46464c 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/BenchmarkDeployment.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/BenchmarkDeployment.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.benchmark +package rocks.theodolite.kubernetes /** * A BenchmarkDeployment contains the necessary infrastructure to execute a benchmark. diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/BenchmarkDeploymentBuilder.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/BenchmarkDeploymentBuilder.kt similarity index 93% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/BenchmarkDeploymentBuilder.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/BenchmarkDeploymentBuilder.kt index c0d7871cb339c6e0c9d8f2a5c71996772c7a9d2b..89475965d8392dd6786af8e96408871d3ef60ff3 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/BenchmarkDeploymentBuilder.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/BenchmarkDeploymentBuilder.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.benchmark +package rocks.theodolite.kubernetes import rocks.theodolite.kubernetes.patcher.PatcherDefinition import rocks.theodolite.kubernetes.util.ConfigurationOverride diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/ConfigMapResourceSet.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ConfigMapResourceSet.kt similarity index 94% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/ConfigMapResourceSet.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ConfigMapResourceSet.kt index ccf7d95f55a9da5f84c001f14a4e4b74beccbf62..43c478b983d879135b00e6208df8bb36b7978c8f 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/ConfigMapResourceSet.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ConfigMapResourceSet.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.resourceSet +package rocks.theodolite.kubernetes import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.fabric8.kubernetes.api.model.HasMetadata @@ -6,7 +6,6 @@ import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.client.KubernetesClientException import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.quarkus.runtime.annotations.RegisterForReflection -import rocks.theodolite.kubernetes.util.exception.DeploymentFailedException import java.lang.IllegalArgumentException @RegisterForReflection diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/Configuration.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Configuration.kt similarity index 85% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/Configuration.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Configuration.kt index f172b07dfb9c0fe8ece0496537463a7bffd6678e..e28e2a2a7644222f656bdebd05d122cd853ac456 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/Configuration.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Configuration.kt @@ -1,6 +1,4 @@ -package rocks.theodolite.kubernetes.util - -import rocks.theodolite.kubernetes.execution.ExecutionModes +package rocks.theodolite.kubernetes // Defaults private const val DEFAULT_NAMESPACE = "default" diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/DeploymentFailedException.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/DeploymentFailedException.kt similarity index 68% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/DeploymentFailedException.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/DeploymentFailedException.kt index be577bd9dba1ac73b58d4d04ce3bc8f026d2b997..cde0021255b471354e8513139cad0f6e083f804a 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/DeploymentFailedException.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/DeploymentFailedException.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.util.exception +package rocks.theodolite.kubernetes open class DeploymentFailedException(message: String, e: Exception? = null) : TheodoliteException(message,e) diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/ExecutionFailedException.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ExecutionFailedException.kt similarity index 68% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/ExecutionFailedException.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ExecutionFailedException.kt index efbd8fd0c686b4052ea7a675099ac985c9b431e8..8924dd18199e0ff937c783873878c6f245d01ea5 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/ExecutionFailedException.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ExecutionFailedException.kt @@ -1,3 +1,3 @@ -package rocks.theodolite.kubernetes.util.exception +package rocks.theodolite.kubernetes open class ExecutionFailedException(message: String, e: Exception? = null) : TheodoliteException(message,e) diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/ExecutionModes.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ExecutionModes.kt similarity index 69% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/ExecutionModes.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ExecutionModes.kt index 5c3f77e58b452edb034b005351d395f192240717..e8e4b642689c455b7be6c32d0bdedad58861238c 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/ExecutionModes.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ExecutionModes.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.execution +package rocks.theodolite.kubernetes enum class ExecutionModes(val value: String) { OPERATOR("operator"), diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/ExperimentRunnerImpl.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ExperimentRunnerImpl.kt similarity index 94% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/ExperimentRunnerImpl.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ExperimentRunnerImpl.kt index d139eb88ec622867888016610b7f20bf756bceec..9cad1ccf42bae5216de2b23326253ce95fc2156a 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/ExperimentRunnerImpl.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ExperimentRunnerImpl.kt @@ -1,18 +1,14 @@ -package rocks.theodolite.kubernetes.execution +package rocks.theodolite.kubernetes import io.quarkus.runtime.annotations.RegisterForReflection import mu.KotlinLogging import rocks.theodolite.core.ExperimentRunner import rocks.theodolite.core.Results -import rocks.theodolite.kubernetes.benchmark.BenchmarkDeploymentBuilder -import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmarkDeploymentBuilder import rocks.theodolite.kubernetes.model.KubernetesBenchmark.Slo import rocks.theodolite.kubernetes.util.ConfigurationOverride import rocks.theodolite.kubernetes.operator.EventCreator import rocks.theodolite.kubernetes.slo.AnalysisExecutor -import rocks.theodolite.kubernetes.util.Configuration import rocks.theodolite.kubernetes.patcher.PatcherDefinition -import rocks.theodolite.kubernetes.util.exception.ExecutionFailedException import java.time.Duration import java.time.Instant diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/FileSystemResourceSet.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/FileSystemResourceSet.kt similarity index 94% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/FileSystemResourceSet.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/FileSystemResourceSet.kt index 39d09761a3c3d628fcca67d469c5ad409394123f..44dacc044e2af477814be0399d23a5b14818bcee 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/FileSystemResourceSet.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/FileSystemResourceSet.kt @@ -1,11 +1,10 @@ -package rocks.theodolite.kubernetes.resourceSet +package rocks.theodolite.kubernetes import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.fabric8.kubernetes.api.model.HasMetadata import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.quarkus.runtime.annotations.RegisterForReflection -import rocks.theodolite.kubernetes.util.exception.DeploymentFailedException import java.io.BufferedReader import java.io.FileInputStream import java.io.FileNotFoundException diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/K8sContextFactory.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/K8sContextFactory.kt similarity index 95% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/K8sContextFactory.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/K8sContextFactory.kt index adef75821bd42f839102abe9ef96bf741044ae9a..880449d1952247bd7bf1784e083acc14ee59fea5 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/K8sContextFactory.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/K8sContextFactory.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.k8s +package rocks.theodolite.kubernetes import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/K8sManager.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/K8sManager.kt similarity index 90% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/K8sManager.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/K8sManager.kt index 0c1f24c1be0ccda9ce1516459141440296348a39..66bfb2572bfcb5cb53d579a8af1c94c2b39bb532 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/K8sManager.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/K8sManager.kt @@ -1,9 +1,6 @@ -package rocks.theodolite.kubernetes.k8s +package rocks.theodolite.kubernetes -import io.fabric8.kubernetes.api.model.ConfigMap import io.fabric8.kubernetes.api.model.HasMetadata -import io.fabric8.kubernetes.api.model.KubernetesResource -import io.fabric8.kubernetes.api.model.Service import io.fabric8.kubernetes.api.model.apps.Deployment import io.fabric8.kubernetes.api.model.apps.StatefulSet import io.fabric8.kubernetes.client.NamespacedKubernetesClient diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeployment.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/KubernetesBenchmarkDeployment.kt similarity index 81% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeployment.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/KubernetesBenchmarkDeployment.kt index 2e0f447cf9aae29dc43954d5789b963e7672b178..5bff6b375695e0e82ef3a888f83c484d81bb585e 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeployment.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/KubernetesBenchmarkDeployment.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.benchmark +package rocks.theodolite.kubernetes import io.fabric8.kubernetes.api.model.HasMetadata import io.fabric8.kubernetes.api.model.KubernetesResource @@ -6,8 +6,6 @@ import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.quarkus.runtime.annotations.RegisterForReflection import mu.KotlinLogging import org.apache.kafka.clients.admin.NewTopic -import rocks.theodolite.kubernetes.k8s.K8sManager -import rocks.theodolite.kubernetes.k8s.ResourceByLabelHandler import rocks.theodolite.kubernetes.kafka.TopicManager import rocks.theodolite.kubernetes.model.crd.KafkaConfig import java.time.Duration @@ -24,17 +22,17 @@ private val logger = KotlinLogging.logger {} */ @RegisterForReflection class KubernetesBenchmarkDeployment( - private val sutBeforeActions: List<Action>, - private val sutAfterActions: List<Action>, - private val loadGenBeforeActions: List<Action>, - private val loadGenAfterActions: List<Action>, - val appResources: List<HasMetadata>, - val loadGenResources: List<HasMetadata>, - private val loadGenerationDelay: Long, - private val afterTeardownDelay: Long, - private val kafkaConfig: Map<String, Any>, - private val topics: List<KafkaConfig.TopicWrapper>, - private val client: NamespacedKubernetesClient + private val sutBeforeActions: List<Action>, + private val sutAfterActions: List<Action>, + private val loadGenBeforeActions: List<Action>, + private val loadGenAfterActions: List<Action>, + val appResources: List<HasMetadata>, + val loadGenResources: List<HasMetadata>, + private val loadGenerationDelay: Long, + private val afterTeardownDelay: Long, + private val kafkaConfig: Map<String, Any>, + private val topics: List<KafkaConfig.TopicWrapper>, + private val client: NamespacedKubernetesClient ) : BenchmarkDeployment { private val kafkaController = TopicManager(this.kafkaConfig) private val kubernetesManager = K8sManager(client) diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeploymentBuilder.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/KubernetesBenchmarkDeploymentBuilder.kt similarity index 96% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeploymentBuilder.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/KubernetesBenchmarkDeploymentBuilder.kt index 19f7ad052310b8c454d9273d71458c99b5a3e256..44b60b345ecb94928fd8655736297547774826ca 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeploymentBuilder.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/KubernetesBenchmarkDeploymentBuilder.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.benchmark +package rocks.theodolite.kubernetes import io.fabric8.kubernetes.client.NamespacedKubernetesClient import mu.KotlinLogging @@ -6,7 +6,6 @@ import rocks.theodolite.kubernetes.model.KubernetesBenchmark import rocks.theodolite.kubernetes.patcher.PatcherFactory import rocks.theodolite.kubernetes.util.ConfigurationOverride import rocks.theodolite.kubernetes.patcher.PatcherDefinition -import rocks.theodolite.kubernetes.resourceSet.loadKubernetesResources private val logger = KotlinLogging.logger {} diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Main.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Main.kt index 7a21b580a13f09aa4ef7b06694c4bc4d3dea4fe8..cbd7c3106b39c4571d559d4071cd4ac16e180bc8 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Main.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Main.kt @@ -4,10 +4,8 @@ import io.fabric8.kubernetes.client.DefaultKubernetesClient import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.quarkus.runtime.annotations.QuarkusMain import mu.KotlinLogging -import rocks.theodolite.kubernetes.execution.ExecutionModes import rocks.theodolite.kubernetes.operator.TheodoliteOperator import rocks.theodolite.kubernetes.standalone.TheodoliteStandalone -import rocks.theodolite.kubernetes.util.Configuration import kotlin.system.exitProcess private val logger = KotlinLogging.logger {} diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/ResourceByLabelHandler.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ResourceByLabelHandler.kt similarity index 98% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/ResourceByLabelHandler.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ResourceByLabelHandler.kt index ef3d56d0b11ad088366d8e56e06e2237ff3d955e..c65235f5fef304a7644399573380b4147704cb6c 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/ResourceByLabelHandler.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ResourceByLabelHandler.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.k8s +package rocks.theodolite.kubernetes import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/ResourceSet.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ResourceSet.kt similarity index 90% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/ResourceSet.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ResourceSet.kt index 09dfa774909825b66f1822ee2a16e9d2164581c1..9910d0ac89a9b423047f4f20f07a8015cbb24f9a 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/ResourceSet.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ResourceSet.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.resourceSet +package rocks.theodolite.kubernetes import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.fabric8.kubernetes.api.model.KubernetesResource diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/ResourceSets.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ResourceSets.kt similarity index 92% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/ResourceSets.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ResourceSets.kt index 986ab52244e39c075b52d8fa534f20f1192e8437..cc9d82f38ae1f135a37a04fef4ecc3c1a33d2a26 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/ResourceSets.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/ResourceSets.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.resourceSet +package rocks.theodolite.kubernetes import com.fasterxml.jackson.annotation.JsonInclude import com.fasterxml.jackson.annotation.JsonProperty @@ -7,7 +7,6 @@ import io.fabric8.kubernetes.api.model.HasMetadata import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.quarkus.runtime.annotations.RegisterForReflection -import rocks.theodolite.kubernetes.util.exception.DeploymentFailedException /** * Loads [KubernetesResource]s. diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Shutdown.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Shutdown.kt index 68a5f81425724f6dad3890a33314e4e650f51bde..221039f768c7b1e1ecc9bc767647e596ee057aa5 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Shutdown.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Shutdown.kt @@ -2,7 +2,6 @@ package rocks.theodolite.kubernetes import io.fabric8.kubernetes.client.NamespacedKubernetesClient import mu.KotlinLogging -import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmarkDeploymentBuilder import rocks.theodolite.kubernetes.model.BenchmarkExecution import rocks.theodolite.kubernetes.model.KubernetesBenchmark diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/TheodoliteException.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/TheodoliteException.kt similarity index 64% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/TheodoliteException.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/TheodoliteException.kt index bb9b4e29c3cf0eb4bdef215919e7eacca3d6b5ec..6a4374c3e3c9435c498c8e15e8c5efaa01fd89cd 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/TheodoliteException.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/TheodoliteException.kt @@ -1,3 +1,3 @@ -package rocks.theodolite.kubernetes.util.exception +package rocks.theodolite.kubernetes open class TheodoliteException (message: String, e: Exception? = null) : Exception(message,e) \ No newline at end of file diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/TheodoliteExecutor.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/TheodoliteExecutor.kt similarity index 96% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/TheodoliteExecutor.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/TheodoliteExecutor.kt index 157ecf655d1b295cabd07529e419ab9699d46565..6371a0243107376687a065943a4d54de47922be0 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/TheodoliteExecutor.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/TheodoliteExecutor.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.execution +package rocks.theodolite.kubernetes import io.fabric8.kubernetes.client.NamespacedKubernetesClient import mu.KotlinLogging @@ -11,10 +11,7 @@ import rocks.theodolite.core.strategies.StrategyFactory import rocks.theodolite.core.Config import rocks.theodolite.core.IOHandler import rocks.theodolite.core.Results -import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmarkDeploymentBuilder -import rocks.theodolite.kubernetes.k8s.K8sManager import rocks.theodolite.kubernetes.model.KubernetesBenchmark -import rocks.theodolite.kubernetes.resourceSet.loadKubernetesResources import rocks.theodolite.kubernetes.slo.SloFactory import java.io.File import java.time.Duration diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/KubernetesBenchmark.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/KubernetesBenchmark.kt index 9498374e16bb4a88023e2bf41efb69b969effdc3..8f109444e5552efa1d755f82ec2292f9dd61a20d 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/KubernetesBenchmark.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/KubernetesBenchmark.kt @@ -3,8 +3,8 @@ package rocks.theodolite.kubernetes.model import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.fabric8.kubernetes.api.model.KubernetesResource import io.quarkus.runtime.annotations.RegisterForReflection -import rocks.theodolite.kubernetes.benchmark.Action -import rocks.theodolite.kubernetes.resourceSet.ResourceSets +import rocks.theodolite.kubernetes.Action +import rocks.theodolite.kubernetes.ResourceSets import rocks.theodolite.kubernetes.model.crd.KafkaConfig import rocks.theodolite.kubernetes.patcher.PatcherDefinition import kotlin.properties.Delegates diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/BenchmarkStateChecker.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/BenchmarkStateChecker.kt index c9588b576963b4e64484d8ca25994008dfed4069..ac56403a0690c740ef0aa81f22bd5cc2abccebb6 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/BenchmarkStateChecker.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/BenchmarkStateChecker.kt @@ -5,14 +5,14 @@ import io.fabric8.kubernetes.api.model.apps.StatefulSet import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.fabric8.kubernetes.client.dsl.MixedOperation import io.fabric8.kubernetes.client.dsl.Resource -import rocks.theodolite.kubernetes.benchmark.Action -import rocks.theodolite.kubernetes.benchmark.ActionSelector +import rocks.theodolite.kubernetes.Action +import rocks.theodolite.kubernetes.ActionSelector import rocks.theodolite.kubernetes.model.KubernetesBenchmark -import rocks.theodolite.kubernetes.resourceSet.ResourceSets +import rocks.theodolite.kubernetes.ResourceSets import rocks.theodolite.kubernetes.model.crd.BenchmarkCRD import rocks.theodolite.kubernetes.model.crd.BenchmarkState import rocks.theodolite.kubernetes.model.crd.KubernetesBenchmarkList -import rocks.theodolite.kubernetes.resourceSet.loadKubernetesResources +import rocks.theodolite.kubernetes.loadKubernetesResources class BenchmarkStateChecker( private val benchmarkCRDClient: MixedOperation<BenchmarkCRD, KubernetesBenchmarkList, Resource<BenchmarkCRD>>, diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/ClusterSetup.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/ClusterSetup.kt index db95659f031c7284b9021f61c98bbb524429e184..4cfa872247d0510e73132a1434111a52071d188a 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/ClusterSetup.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/ClusterSetup.kt @@ -3,8 +3,8 @@ package rocks.theodolite.kubernetes.operator import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.fabric8.kubernetes.client.dsl.MixedOperation import io.fabric8.kubernetes.client.dsl.Resource -import rocks.theodolite.kubernetes.k8s.K8sContextFactory -import rocks.theodolite.kubernetes.k8s.ResourceByLabelHandler +import rocks.theodolite.kubernetes.K8sContextFactory +import rocks.theodolite.kubernetes.ResourceByLabelHandler import rocks.theodolite.kubernetes.model.crd.* import rocks.theodolite.kubernetes.Shutdown diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/EventCreator.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/EventCreator.kt index cb23f87912dd58152053ce1cbb8be9a093a2222c..6803da62f045efcaf1b5504a33b42b2200d16baa 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/EventCreator.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/EventCreator.kt @@ -6,7 +6,7 @@ import io.fabric8.kubernetes.api.model.ObjectReference import io.fabric8.kubernetes.client.DefaultKubernetesClient import io.fabric8.kubernetes.client.NamespacedKubernetesClient import mu.KotlinLogging -import rocks.theodolite.kubernetes.util.Configuration +import rocks.theodolite.kubernetes.Configuration import java.time.Instant import java.util.* import kotlin.NoSuchElementException diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/TheodoliteController.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/TheodoliteController.kt index ddb081b83a9c9dbbc7690a3e0d84bea9c51cfe84..9fdc409e159791f30b62f899e0f4d7aa7bcab319 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/TheodoliteController.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/TheodoliteController.kt @@ -9,11 +9,11 @@ import rocks.theodolite.kubernetes.model.crd.BenchmarkCRD import rocks.theodolite.kubernetes.model.crd.ExecutionState import rocks.theodolite.kubernetes.model.crd.KubernetesBenchmarkList import rocks.theodolite.kubernetes.model.KubernetesBenchmark -import rocks.theodolite.kubernetes.execution.TheodoliteExecutor +import rocks.theodolite.kubernetes.TheodoliteExecutor import rocks.theodolite.kubernetes.model.crd.* import rocks.theodolite.kubernetes.patcher.ConfigOverrideModifier import rocks.theodolite.kubernetes.model.crd.ExecutionStateComparator -import rocks.theodolite.kubernetes.resourceSet.loadKubernetesResources +import rocks.theodolite.kubernetes.loadKubernetesResources import java.lang.Thread.sleep private val logger = KotlinLogging.logger {} diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/TheodoliteOperator.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/TheodoliteOperator.kt index 83420b55a93d41a38a2f5832ddecb219be0c17bf..0d0b1533e0d4dcb23b2ea414e6260c2837b6de36 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/TheodoliteOperator.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/TheodoliteOperator.kt @@ -6,11 +6,11 @@ import io.fabric8.kubernetes.client.dsl.Resource import io.fabric8.kubernetes.client.informers.SharedInformerFactory import io.fabric8.kubernetes.internal.KubernetesDeserializer import mu.KotlinLogging +import rocks.theodolite.kubernetes.Configuration import rocks.theodolite.kubernetes.model.crd.BenchmarkCRD import rocks.theodolite.kubernetes.model.crd.BenchmarkExecutionList import rocks.theodolite.kubernetes.model.crd.ExecutionCRD import rocks.theodolite.kubernetes.model.crd.KubernetesBenchmarkList -import rocks.theodolite.kubernetes.util.Configuration private const val EXECUTION_SINGULAR = "execution" diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/InvalidPatcherConfigurationException.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/InvalidPatcherConfigurationException.kt similarity index 53% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/InvalidPatcherConfigurationException.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/InvalidPatcherConfigurationException.kt index 895d83dcec677f3b862a888ea1bcb90e5da8652c..88ad707ec48b0c2c2b3a62cc46f004ced64dbb69 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/InvalidPatcherConfigurationException.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/InvalidPatcherConfigurationException.kt @@ -1,3 +1,5 @@ -package rocks.theodolite.kubernetes.util.exception +package rocks.theodolite.kubernetes.patcher + +import rocks.theodolite.kubernetes.DeploymentFailedException class InvalidPatcherConfigurationException(message: String, e: Exception? = null) : DeploymentFailedException(message,e) diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/PatcherFactory.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/PatcherFactory.kt index ce54b1b83c1d0aa30fc336b0e29fdbeafe00c9cf..ce4bd525cea3a48f4606e134220c39b0b878ff12 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/PatcherFactory.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/PatcherFactory.kt @@ -1,7 +1,6 @@ package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.KubernetesResource -import rocks.theodolite.kubernetes.util.exception.InvalidPatcherConfigurationException /** * The Patcher factory creates [Patcher]s diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ResourceLimitPatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ResourceLimitPatcher.kt index 340236dfb037bdfc19f8569db524f417be7cd95e..e389f461a4afcf56f290ee9cd676503817b5e91e 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ResourceLimitPatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ResourceLimitPatcher.kt @@ -6,7 +6,6 @@ import io.fabric8.kubernetes.api.model.Quantity import io.fabric8.kubernetes.api.model.ResourceRequirements import io.fabric8.kubernetes.api.model.apps.Deployment import io.fabric8.kubernetes.api.model.apps.StatefulSet -import rocks.theodolite.kubernetes.util.exception.InvalidPatcherConfigurationException /** * The Resource limit [Patcher] set resource limits for deployments and statefulSets. diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ResourceRequestPatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ResourceRequestPatcher.kt index d461a0f86ecb7cd4e39ce6dd3adb23b14cd8c6af..89d4004fee4b8e3e10b91dd794ab7cbda43786bb 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ResourceRequestPatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ResourceRequestPatcher.kt @@ -6,7 +6,6 @@ import io.fabric8.kubernetes.api.model.Quantity import io.fabric8.kubernetes.api.model.ResourceRequirements import io.fabric8.kubernetes.api.model.apps.Deployment import io.fabric8.kubernetes.api.model.apps.StatefulSet -import rocks.theodolite.kubernetes.util.exception.InvalidPatcherConfigurationException /** * The Resource request [Patcher] set resource limits for deployments and statefulSets. diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/AnalysisExecutor.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/AnalysisExecutor.kt index d5a1bfa876ce83de710fc01e59a8bd7894113ab2..d5b675de45751b6ca50fdb7fd1f20250abaf520e 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/AnalysisExecutor.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/AnalysisExecutor.kt @@ -3,7 +3,6 @@ package rocks.theodolite.kubernetes.slo import rocks.theodolite.core.strategies.Metric import rocks.theodolite.core.IOHandler import rocks.theodolite.kubernetes.model.KubernetesBenchmark.Slo -import rocks.theodolite.kubernetes.util.exception.EvaluationFailedException import java.text.Normalizer import java.time.Duration import java.time.Instant diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/EvaluationFailedException.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/EvaluationFailedException.kt similarity index 52% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/EvaluationFailedException.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/EvaluationFailedException.kt index 05a552cb8c4a69494c4d9b232d3dd7714392f210..564ec926aeba501c55675ba3d25cfa8ebf50b68b 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/EvaluationFailedException.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/EvaluationFailedException.kt @@ -1,3 +1,5 @@ -package rocks.theodolite.kubernetes.util.exception +package rocks.theodolite.kubernetes.slo + +import rocks.theodolite.kubernetes.ExecutionFailedException class EvaluationFailedException(message: String, e: Exception? = null) : ExecutionFailedException(message,e) diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/PrometheusResponse.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/PrometheusResponse.kt similarity index 100% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/PrometheusResponse.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/PrometheusResponse.kt diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/SloConfigHandler.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/SloConfigHandler.kt index 4d9db9808680f6baba488569be210340739a27b4..e7b0d8b8ebd672b6693867c781c669d90a4e3fe6 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/SloConfigHandler.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/SloConfigHandler.kt @@ -1,7 +1,7 @@ package rocks.theodolite.kubernetes.slo import rocks.theodolite.kubernetes.model.KubernetesBenchmark.Slo -import rocks.theodolite.kubernetes.util.exception.InvalidPatcherConfigurationException +import rocks.theodolite.kubernetes.patcher.InvalidPatcherConfigurationException import javax.enterprise.context.ApplicationScoped private const val CONSUMER_LAG_QUERY = "sum by(consumergroup) (kafka_consumergroup_lag >= 0)" diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/standalone/TheodoliteStandalone.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/standalone/TheodoliteStandalone.kt index bddbee80f356c1e13986fbeed47df2c37f49b0b8..8cf3959b95374183a989a0217d754aea7eab716a 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/standalone/TheodoliteStandalone.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/standalone/TheodoliteStandalone.kt @@ -4,10 +4,10 @@ import io.fabric8.kubernetes.client.NamespacedKubernetesClient import mu.KotlinLogging import rocks.theodolite.kubernetes.model.BenchmarkExecution import rocks.theodolite.kubernetes.model.KubernetesBenchmark -import rocks.theodolite.kubernetes.execution.TheodoliteExecutor +import rocks.theodolite.kubernetes.TheodoliteExecutor import rocks.theodolite.kubernetes.util.YamlParserFromFile -import rocks.theodolite.kubernetes.util.exception.EvaluationFailedException -import rocks.theodolite.kubernetes.util.exception.ExecutionFailedException +import rocks.theodolite.kubernetes.slo.EvaluationFailedException +import rocks.theodolite.kubernetes.ExecutionFailedException import rocks.theodolite.kubernetes.Shutdown import kotlin.concurrent.thread import kotlin.system.exitProcess diff --git a/theodolite/src/test/kotlin/rocks/theodolite/core/strategies/searchstrategy/InitialGuessSearchStrategyTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/core/strategies/searchstrategy/InitialGuessSearchStrategyTest.kt index 2439d33014e5c3d24b3e94cf8af05275f596e507..2c47ab9a9ff27030b545a95380a7024c5d27d202 100644 --- a/theodolite/src/test/kotlin/rocks/theodolite/core/strategies/searchstrategy/InitialGuessSearchStrategyTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/core/strategies/searchstrategy/InitialGuessSearchStrategyTest.kt @@ -5,8 +5,8 @@ import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import rocks.theodolite.core.strategies.Metric import mu.KotlinLogging -import rocks.theodolite.kubernetes.benchmark.TestBenchmarkDeploymentBuilder -import rocks.theodolite.kubernetes.execution.TestExperimentRunnerImpl +import rocks.theodolite.kubernetes.TestBenchmarkDeploymentBuilder +import rocks.theodolite.kubernetes.TestExperimentRunnerImpl import rocks.theodolite.core.strategies.guessstrategy.PrevInstanceOptGuess import rocks.theodolite.core.Results import rocks.theodolite.kubernetes.model.KubernetesBenchmark.Slo diff --git a/theodolite/src/test/kotlin/rocks/theodolite/core/strategies/searchstrategy/RestrictionSearchTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/core/strategies/searchstrategy/RestrictionSearchTest.kt index afb934a3d8ea5fcef7719303018cb06c2e08bf8c..77a33c8d3a413de4e7ede1fe2e0ee277f04bc144 100644 --- a/theodolite/src/test/kotlin/rocks/theodolite/core/strategies/searchstrategy/RestrictionSearchTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/core/strategies/searchstrategy/RestrictionSearchTest.kt @@ -3,8 +3,8 @@ package rocks.theodolite.core.strategies.searchstrategy import io.quarkus.test.junit.QuarkusTest import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test -import rocks.theodolite.kubernetes.benchmark.TestBenchmarkDeploymentBuilder -import rocks.theodolite.kubernetes.execution.TestExperimentRunnerImpl +import rocks.theodolite.kubernetes.TestBenchmarkDeploymentBuilder +import rocks.theodolite.kubernetes.TestExperimentRunnerImpl import rocks.theodolite.core.strategies.Metric import rocks.theodolite.core.strategies.restrictionstrategy.LowerBoundRestriction diff --git a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/ActionCommandTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/ActionCommandTest.kt similarity index 96% rename from theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/ActionCommandTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/ActionCommandTest.kt index 92f7d27ae07870ac2a4a4f6e3feda71e95ba71a8..274a112ec7922e5048e76e38866e11bb89cb048c 100644 --- a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/ActionCommandTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/ActionCommandTest.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.benchmark +package rocks.theodolite.kubernetes import io.fabric8.kubernetes.api.model.Pod import io.fabric8.kubernetes.api.model.PodBuilder @@ -10,7 +10,6 @@ import org.junit.jupiter.api.* import org.junit.jupiter.api.Assertions.assertEquals import rocks.theodolite.kubernetes.operator.TheodoliteController import rocks.theodolite.kubernetes.operator.TheodoliteOperator -import rocks.theodolite.kubernetes.util.exception.ActionCommandFailedException @QuarkusTest diff --git a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/resourceSet/ConfigMapResourceSetTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/ConfigMapResourceSetTest.kt similarity index 98% rename from theodolite/src/test/kotlin/rocks/theodolite/kubernetes/resourceSet/ConfigMapResourceSetTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/ConfigMapResourceSetTest.kt index ad856ca7a09537b1e9844963412e2aac57b671d9..87058706c1a315c98ba098e6c5835f3a57343112 100644 --- a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/resourceSet/ConfigMapResourceSetTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/ConfigMapResourceSetTest.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.resourceSet +package rocks.theodolite.kubernetes import com.fasterxml.jackson.databind.ObjectMapper import io.fabric8.kubernetes.api.model.* @@ -24,7 +24,6 @@ import rocks.theodolite.kubernetes.model.crd.BenchmarkCRDummy import rocks.theodolite.kubernetes.operator.ExecutionClient import rocks.theodolite.kubernetes.model.crd.BenchmarkCRD import rocks.theodolite.kubernetes.model.crd.ExecutionCRD -import rocks.theodolite.kubernetes.util.exception.DeploymentFailedException import java.io.FileInputStream // TODO move somewhere else diff --git a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/ErrorChannelMessage.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/ErrorChannelMessage.kt similarity index 93% rename from theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/ErrorChannelMessage.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/ErrorChannelMessage.kt index e920776ae585555b8b99f14ae8ac7e4c734fc70b..4181b7cbb90fd0c6bd2db78753560092d7ea60ca 100644 --- a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/ErrorChannelMessage.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/ErrorChannelMessage.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.benchmark +package rocks.theodolite.kubernetes import io.fabric8.mockwebserver.internal.WebSocketMessage import java.nio.charset.StandardCharsets diff --git a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/resourceSet/FileSystemResourceSetTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/FileSystemResourceSetTest.kt similarity index 98% rename from theodolite/src/test/kotlin/rocks/theodolite/kubernetes/resourceSet/FileSystemResourceSetTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/FileSystemResourceSetTest.kt index a9a57d8cf3a8a5ffce9a80005840e9e8fe289fb9..1c5f32159713e7ace6857caf0f97b43c90cb36e0 100644 --- a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/resourceSet/FileSystemResourceSetTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/FileSystemResourceSetTest.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.resourceSet +package rocks.theodolite.kubernetes import io.fabric8.kubernetes.api.model.* import io.fabric8.kubernetes.api.model.apps.Deployment @@ -15,7 +15,6 @@ import org.junit.jupiter.api.io.TempDir import registerResource import rocks.theodolite.kubernetes.model.crd.BenchmarkCRD import rocks.theodolite.kubernetes.model.crd.ExecutionCRD -import rocks.theodolite.kubernetes.util.exception.DeploymentFailedException import java.io.FileInputStream import java.nio.file.Files import java.nio.file.Path diff --git a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/k8s/K8sManagerTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/K8sManagerTest.kt similarity index 99% rename from theodolite/src/test/kotlin/rocks/theodolite/kubernetes/k8s/K8sManagerTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/K8sManagerTest.kt index 92adf08fbaa851357e092b958d74b6c35ce5b692..90dd01626a7c18e0b6f8d6018aae54297e758464 100644 --- a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/k8s/K8sManagerTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/K8sManagerTest.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.k8s +package rocks.theodolite.kubernetes import io.fabric8.kubernetes.api.model.* import io.fabric8.kubernetes.api.model.apps.Deployment diff --git a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/TestBenchmarkDeployment.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/TestBenchmarkDeployment.kt similarity index 51% rename from theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/TestBenchmarkDeployment.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/TestBenchmarkDeployment.kt index 881ed6977de0b29579a72645022129db2f96c555..92bc2fd26a8c5e9d77b0729731b3e65833b3dd08 100644 --- a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/TestBenchmarkDeployment.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/TestBenchmarkDeployment.kt @@ -1,6 +1,6 @@ -package rocks.theodolite.kubernetes.benchmark +package rocks.theodolite.kubernetes -import rocks.theodolite.kubernetes.benchmark.BenchmarkDeployment +import rocks.theodolite.kubernetes.BenchmarkDeployment class TestBenchmarkDeployment : BenchmarkDeployment { override fun setup() {} diff --git a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/TestBenchmarkDeploymentBuilder.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/TestBenchmarkDeploymentBuilder.kt similarity index 93% rename from theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/TestBenchmarkDeploymentBuilder.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/TestBenchmarkDeploymentBuilder.kt index 0c0c03e7c51d7a4f7a1edd4f694f970ad5d19140..456ba34117ff08312eb356195cf0107f1cd99120 100644 --- a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/TestBenchmarkDeploymentBuilder.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/TestBenchmarkDeploymentBuilder.kt @@ -1,4 +1,4 @@ -package rocks.theodolite.kubernetes.benchmark +package rocks.theodolite.kubernetes import rocks.theodolite.kubernetes.util.ConfigurationOverride diff --git a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/execution/TestExperimentRunnerImpl.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/TestExperimentRunnerImpl.kt similarity index 86% rename from theodolite/src/test/kotlin/rocks/theodolite/kubernetes/execution/TestExperimentRunnerImpl.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/TestExperimentRunnerImpl.kt index 7f862e1089632918ab6a78fcf3f5387f39b38953..896beed83e0c9436c3aadc83b1e395df06b1f5b2 100644 --- a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/execution/TestExperimentRunnerImpl.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/TestExperimentRunnerImpl.kt @@ -1,6 +1,5 @@ -package rocks.theodolite.kubernetes.execution +package rocks.theodolite.kubernetes -import rocks.theodolite.kubernetes.benchmark.TestBenchmarkDeploymentBuilder import rocks.theodolite.core.Results import rocks.theodolite.kubernetes.model.KubernetesBenchmark.Slo import rocks.theodolite.core.ExperimentRunner diff --git a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/BenchmarkStateCheckerTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/BenchmarkStateCheckerTest.kt index 640aa42555118210a40706fd825fcc8b55b30cf9..d9009222122f99d587c5dc6522a794639a84d4e6 100644 --- a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/BenchmarkStateCheckerTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/BenchmarkStateCheckerTest.kt @@ -13,12 +13,13 @@ import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.api.Assertions.* -import rocks.theodolite.kubernetes.benchmark.* +import rocks.theodolite.kubernetes.ActionSelector import rocks.theodolite.kubernetes.model.crd.BenchmarkState import rocks.theodolite.kubernetes.model.KubernetesBenchmark import rocks.theodolite.kubernetes.model.crd.BenchmarkCRDummy -import rocks.theodolite.kubernetes.resourceSet.ConfigMapResourceSet -import rocks.theodolite.kubernetes.resourceSet.ResourceSets +import rocks.theodolite.kubernetes.ConfigMapResourceSet +import rocks.theodolite.kubernetes.PodSelector +import rocks.theodolite.kubernetes.ResourceSets internal class BenchmarkStateCheckerTest { private val server = KubernetesServer(false, false) diff --git a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/StateHandlerTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/StateHandlerTest.kt index a7c7c5caa389740446d3be86da0bf2ed0d19e154..ebef641d1e0a699ab5e220b0846be654fbefc672 100644 --- a/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/StateHandlerTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/StateHandlerTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test -import rocks.theodolite.kubernetes.k8s.K8sManager +import rocks.theodolite.kubernetes.K8sManager import rocks.theodolite.kubernetes.model.crd.ExecutionCRD import rocks.theodolite.kubernetes.model.crd.ExecutionState