From fa21b5a8a215a5991824a9f00847eea83ad347bf Mon Sep 17 00:00:00 2001 From: Marcel Becker <stu117960@mail.uni-kiel.de> Date: Tue, 8 Mar 2022 18:17:48 +0100 Subject: [PATCH] Started splitting into new package structure --- .../theodolite/core}/strategies/Metric.kt | 2 +- .../core}/strategies/StrategyFactory.kt | 17 ++++----- .../guessstrategy}/GuessStrategy.kt | 2 +- .../guessstrategy}/PrevInstanceOptGuess.kt | 2 +- .../LowerBoundRestriction.kt | 4 +-- .../RestrictionStrategy.kt | 4 +-- .../strategies/searchstrategy/BinarySearch.kt | 4 +-- .../strategies/searchstrategy/FullSearch.kt | 4 +-- .../InitialGuessSearchStrategy.kt | 7 ++-- .../strategies/searchstrategy/LinearSearch.kt | 4 +-- .../searchstrategy/RestrictionSearch.kt | 12 +++---- .../searchstrategy/SearchStrategy.kt | 7 ++-- .../theodolite/core}/util/Config.kt | 7 ++-- .../theodolite/core}/util/IOHandler.kt | 2 +- .../theodolite/core}/util/Results.kt | 4 +-- .../kubernetes}/benchmark/Action.kt | 7 ++-- .../kubernetes}/benchmark/ActionCommand.kt | 14 ++++---- .../kubernetes}/benchmark/Benchmark.kt | 6 ++-- .../benchmark/BenchmarkDeployment.kt | 2 +- .../benchmark/BenchmarkExecution.kt | 4 +-- .../benchmark/ConfigMapResourceSet.kt | 8 ++--- .../benchmark/FileSystemResourceSet.kt | 8 ++--- .../benchmark/KubernetesBenchmark.kt | 13 ++++--- .../KubernetesBenchmarkDeployment.kt | 32 ++++++++--------- .../kubernetes}/benchmark/ResourceSet.kt | 2 +- .../kubernetes}/benchmark/ResourceSets.kt | 4 +-- .../kubernetes}/benchmark/Resources.kt | 2 +- .../theodolite/kubernetes}/benchmark/Slo.kt | 2 +- .../execution/BenchmarkExecutor.kt | 36 +++++++++---------- .../execution/BenchmarkExecutorImpl.kt | 16 +++++---- .../kubernetes}/execution/ExecutionModes.kt | 2 +- .../theodolite/kubernetes}/execution/Main.kt | 7 ++-- .../kubernetes}/execution/Shutdown.kt | 6 ++-- .../kubernetes}/execution/SloFactory.kt | 8 ++--- .../execution/TheodoliteExecutor.kt | 16 +++++---- .../operator/AbstractStateHandler.kt | 2 +- .../operator/BenchmarkStateChecker.kt | 22 ++++++------ .../operator/BenchmarkStateHandler.kt | 6 ++-- .../execution/operator/ClusterSetup.kt | 27 +++++++------- .../execution/operator/EventCreator.kt | 4 +-- .../operator/ExecutionEventHandler.kt | 11 +++--- .../operator/ExecutionStateHandler.kt | 6 ++-- .../execution/operator/LeaderElector.kt | 2 +- .../execution/operator/StateHandler.kt | 2 +- .../operator/TheodoliteController.kt | 27 +++++++------- .../execution/operator/TheodoliteOperator.kt | 22 ++++++------ .../kubernetes}/k8s/CustomResourceWrapper.kt | 2 +- .../kubernetes}/k8s/K8sContextFactory.kt | 2 +- .../theodolite/kubernetes}/k8s/K8sManager.kt | 2 +- .../kubernetes}/k8s/ResourceByLabelHandler.kt | 2 +- .../k8s/resourceLoader/AbstractK8sLoader.kt | 4 +-- .../k8s/resourceLoader/K8sResourceLoader.kt | 2 +- .../K8sResourceLoaderFromFile.kt | 8 ++--- .../K8sResourceLoaderFromString.kt | 8 ++--- .../kubernetes/kafka}/TopicManager.kt | 2 +- .../kubernetes}/model/crd/BenchmarkCRD.kt | 4 +-- .../model/crd/BenchmarkExecutionList.kt | 2 +- .../kubernetes}/model/crd/BenchmarkState.kt | 2 +- .../kubernetes}/model/crd/BenchmarkStatus.kt | 2 +- .../kubernetes}/model/crd/ExecutionCRD.kt | 4 +-- .../kubernetes}/model/crd/ExecutionState.kt | 2 +- .../kubernetes}/model/crd/ExecutionStatus.kt | 2 +- .../kubernetes/model/crd}/KafkaConfig.kt | 4 +-- .../model/crd/KubernetesBenchmarkList.kt | 2 +- .../kubernetes}/patcher/AbstractPatcher.kt | 2 +- .../patcher/ConfigOverrideModifier.kt | 8 ++--- .../DataVolumeLoadGeneratorReplicaPatcher.kt | 2 +- .../kubernetes}/patcher/EnvVarPatcher.kt | 2 +- .../kubernetes}/patcher/ImagePatcher.kt | 2 +- .../kubernetes}/patcher/LabelPatcher.kt | 2 +- .../kubernetes}/patcher/MatchLabelPatcher.kt | 2 +- .../patcher/NodeSelectorPatcher.kt | 2 +- ...NestedGroupsLoadGeneratorReplicaPatcher.kt | 2 +- .../NumSensorsLoadGeneratorReplicaPatcher.kt | 2 +- .../theodolite/kubernetes}/patcher/Patcher.kt | 2 +- .../patcher/PatcherDefinitionFactory.kt | 6 ++-- .../kubernetes}/patcher/PatcherFactory.kt | 10 +++--- .../kubernetes}/patcher/ReplicaPatcher.kt | 2 +- .../patcher/ResourceLimitPatcher.kt | 4 +-- .../patcher/ResourceRequestPatcher.kt | 4 +-- .../patcher/SchedulerNamePatcher.kt | 2 +- .../patcher/TemplateLabelPatcher.kt | 2 +- .../slo}/evaluation/AnalysisExecutor.kt | 10 +++--- .../slo}/evaluation/ExternalSloChecker.kt | 4 +-- .../slo}/evaluation/MetricFetcher.kt | 4 +-- .../kubernetes/slo}/evaluation/SloChecker.kt | 4 +-- .../slo}/evaluation/SloCheckerFactory.kt | 4 +-- .../slo}/evaluation/SloConfigHandler.kt | 6 ++-- .../kubernetes/slo}/evaluation/SloJson.kt | 4 +-- .../kubernetes/slo}/evaluation/SloTypes.kt | 2 +- .../standalone}/TheodoliteStandalone.kt | 15 ++++---- .../kubernetes}/util/Configuration.kt | 4 +-- .../kubernetes}/util/ConfigurationOverride.kt | 2 +- .../util/ExecutionStateComparator.kt | 6 ++-- .../theodolite/kubernetes}/util/Parser.kt | 2 +- .../kubernetes}/util/PatcherDefinition.kt | 2 +- .../kubernetes}/util/PrometheusResponse.kt | 2 +- .../theodolite/kubernetes}/util/TypeName.kt | 2 +- .../kubernetes}/util/YamlParserFromFile.kt | 2 +- .../kubernetes}/util/YamlParserFromString.kt | 2 +- .../ActionCommandFailedException.kt | 2 +- .../exception}/DeploymentFailedException.kt | 2 +- .../exception}/EvaluationFailedException.kt | 2 +- .../exception}/ExecutionFailedException.kt | 2 +- .../InvalidPatcherConfigurationException.kt | 2 +- .../util/exception}/TheodoliteException.kt | 2 +- .../InitialGuessSearchStrategyTest.kt | 10 +++--- .../theodolite/ResourceLimitPatcherTest.kt | 6 ++-- .../theodolite/ResourceRequestPatcherTest.kt | 6 ++-- .../theodolite/RestrictionSearchTest.kt | 17 ++++----- .../test/kotlin/theodolite/TestBenchmark.kt | 8 ++--- .../theodolite/TestBenchmarkDeployment.kt | 2 +- .../theodolite/TestBenchmarkExecutorImpl.kt | 8 ++--- .../theodolite/benchmark/ActionCommandTest.kt | 8 +++-- .../benchmark/ConfigMapResourceSetTest.kt | 7 ++-- .../benchmark/FileSystemResourceSetTest.kt | 5 +-- .../execution/operator/BenchmarkCRDummy.kt | 8 ++--- .../operator/BenchmarkStateCheckerTest.kt | 6 ++-- .../execution/operator/ControllerTest.kt | 13 ++++--- .../execution/operator/ExecutionCRDummy.kt | 8 ++--- .../operator/ExecutionEventHandlerTest.kt | 7 ++-- .../ExecutionEventHandlerTestWithInformer.kt | 7 ++-- .../operator/ExecutionEventHandlerWrapper.kt | 11 +++--- .../execution/operator/SloFactoryTest.kt | 10 +++--- .../execution/operator/StateHandlerTest.kt | 8 ++--- .../kotlin/theodolite/k8s/K8sManagerTest.kt | 4 ++- .../theodolite/k8s/K8sResourceLoaderTest.kt | 3 +- .../theodolite/model/crd/CRDExecutionTest.kt | 12 +++---- .../model/crd/ExecutionStatusTest.kt | 2 ++ .../patcher/ConfigOverrideModifierTest.kt | 5 +-- .../restriction/LowerBoundRestrictionTest.kt | 5 +-- .../util/ExecutionStateComparatorTest.kt | 3 +- .../kotlin/theodolite/util/IOHandlerTest.kt | 1 + .../kotlin/theodolite/util/ResultsTest.kt | 3 +- 134 files changed, 426 insertions(+), 378 deletions(-) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/core}/strategies/Metric.kt (87%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/core}/strategies/StrategyFactory.kt (88%) rename theodolite/src/main/kotlin/{theodolite/strategies/searchstrategy => rocks/theodolite/core/strategies/guessstrategy}/GuessStrategy.kt (93%) rename theodolite/src/main/kotlin/{theodolite/strategies/searchstrategy => rocks/theodolite/core/strategies/guessstrategy}/PrevInstanceOptGuess.kt (94%) rename theodolite/src/main/kotlin/{theodolite/strategies/restriction => rocks/theodolite/core/strategies/restrictionstrategy}/LowerBoundRestriction.kt (89%) rename theodolite/src/main/kotlin/{theodolite/strategies/restriction => rocks/theodolite/core/strategies/restrictionstrategy}/RestrictionStrategy.kt (91%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/core}/strategies/searchstrategy/BinarySearch.kt (97%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/core}/strategies/searchstrategy/FullSearch.kt (92%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/core}/strategies/searchstrategy/InitialGuessSearchStrategy.kt (95%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/core}/strategies/searchstrategy/LinearSearch.kt (90%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/core}/strategies/searchstrategy/RestrictionSearch.kt (80%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/core}/strategies/searchstrategy/SearchStrategy.kt (93%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/core}/util/Config.kt (76%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/core}/util/IOHandler.kt (98%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/core}/util/Results.kt (98%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/benchmark/Action.kt (87%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/benchmark/ActionCommand.kt (94%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/benchmark/Benchmark.kt (83%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/benchmark/BenchmarkDeployment.kt (92%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/benchmark/BenchmarkExecution.kt (97%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/benchmark/ConfigMapResourceSet.kt (90%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/benchmark/FileSystemResourceSet.kt (89%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/benchmark/KubernetesBenchmark.kt (92%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/benchmark/KubernetesBenchmarkDeployment.kt (76%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/benchmark/ResourceSet.kt (90%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/benchmark/ResourceSets.kt (90%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/benchmark/Resources.kt (87%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/benchmark/Slo.kt (95%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/BenchmarkExecutor.kt (65%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/BenchmarkExecutorImpl.kt (88%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/ExecutionModes.kt (69%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/Main.kt (73%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/Shutdown.kt (89%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/SloFactory.kt (75%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/TheodoliteExecutor.kt (93%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/operator/AbstractStateHandler.kt (97%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/operator/BenchmarkStateChecker.kt (90%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/operator/BenchmarkStateHandler.kt (80%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/operator/ClusterSetup.kt (75%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/operator/EventCreator.kt (95%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/operator/ExecutionEventHandler.kt (90%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/operator/ExecutionStateHandler.kt (91%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/operator/LeaderElector.kt (96%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/operator/StateHandler.kt (88%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/operator/TheodoliteController.kt (85%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/execution/operator/TheodoliteOperator.kt (89%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/k8s/CustomResourceWrapper.kt (97%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/k8s/K8sContextFactory.kt (95%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/k8s/K8sManager.kt (98%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/k8s/ResourceByLabelHandler.kt (98%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/k8s/resourceLoader/AbstractK8sLoader.kt (96%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/k8s/resourceLoader/K8sResourceLoader.kt (93%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/k8s/resourceLoader/K8sResourceLoaderFromFile.kt (92%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/k8s/resourceLoader/K8sResourceLoaderFromString.kt (91%) rename theodolite/src/main/kotlin/{theodolite/k8s => rocks/theodolite/kubernetes/kafka}/TopicManager.kt (98%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/model/crd/BenchmarkCRD.kt (85%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/model/crd/BenchmarkExecutionList.kt (72%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/model/crd/BenchmarkState.kt (77%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/model/crd/BenchmarkStatus.kt (87%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/model/crd/ExecutionCRD.kt (85%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/model/crd/ExecutionState.kt (86%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/model/crd/ExecutionStatus.kt (97%) rename theodolite/src/main/kotlin/{theodolite/util => rocks/theodolite/kubernetes/model/crd}/KafkaConfig.kt (92%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/model/crd/KubernetesBenchmarkList.kt (72%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/AbstractPatcher.kt (94%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/ConfigOverrideModifier.kt (85%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/DataVolumeLoadGeneratorReplicaPatcher.kt (97%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/EnvVarPatcher.kt (97%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/ImagePatcher.kt (95%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/LabelPatcher.kt (97%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/MatchLabelPatcher.kt (96%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/NodeSelectorPatcher.kt (94%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/NumNestedGroupsLoadGeneratorReplicaPatcher.kt (95%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/NumSensorsLoadGeneratorReplicaPatcher.kt (93%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/Patcher.kt (90%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/PatcherDefinitionFactory.kt (86%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/PatcherFactory.kt (93%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/ReplicaPatcher.kt (93%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/ResourceLimitPatcher.kt (94%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/ResourceRequestPatcher.kt (94%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/SchedulerNamePatcher.kt (92%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/patcher/TemplateLabelPatcher.kt (96%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes/slo}/evaluation/AnalysisExecutor.kt (91%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes/slo}/evaluation/ExternalSloChecker.kt (94%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes/slo}/evaluation/MetricFetcher.kt (95%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes/slo}/evaluation/SloChecker.kt (80%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes/slo}/evaluation/SloCheckerFactory.kt (97%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes/slo}/evaluation/SloConfigHandler.kt (83%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes/slo}/evaluation/SloJson.kt (76%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes/slo}/evaluation/SloTypes.kt (89%) rename theodolite/src/main/kotlin/{theodolite/execution => rocks/theodolite/kubernetes/standalone}/TheodoliteStandalone.kt (80%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/util/Configuration.kt (85%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/util/ConfigurationOverride.kt (91%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/util/ExecutionStateComparator.kt (75%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/util/Parser.kt (89%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/util/PatcherDefinition.kt (94%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/util/PrometheusResponse.kt (98%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/util/TypeName.kt (91%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/util/YamlParserFromFile.kt (91%) rename theodolite/src/main/kotlin/{theodolite => rocks/theodolite/kubernetes}/util/YamlParserFromString.kt (88%) rename theodolite/src/main/kotlin/{theodolite/util => rocks/theodolite/kubernetes/util/exception}/ActionCommandFailedException.kt (69%) rename theodolite/src/main/kotlin/{theodolite/util => rocks/theodolite/kubernetes/util/exception}/DeploymentFailedException.kt (68%) rename theodolite/src/main/kotlin/{theodolite/util => rocks/theodolite/kubernetes/util/exception}/EvaluationFailedException.kt (68%) rename theodolite/src/main/kotlin/{theodolite/util => rocks/theodolite/kubernetes/util/exception}/ExecutionFailedException.kt (68%) rename theodolite/src/main/kotlin/{theodolite/util => rocks/theodolite/kubernetes/util/exception}/InvalidPatcherConfigurationException.kt (70%) rename theodolite/src/main/kotlin/{theodolite/util => rocks/theodolite/kubernetes/util/exception}/TheodoliteException.kt (64%) diff --git a/theodolite/src/main/kotlin/theodolite/strategies/Metric.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/Metric.kt similarity index 87% rename from theodolite/src/main/kotlin/theodolite/strategies/Metric.kt rename to theodolite/src/main/kotlin/rocks/theodolite/core/strategies/Metric.kt index 05383ca91..db161d10c 100644 --- a/theodolite/src/main/kotlin/theodolite/strategies/Metric.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/Metric.kt @@ -1,4 +1,4 @@ -package theodolite.strategies +package rocks.theodolite.core.strategies enum class Metric(val value: String) { DEMAND("demand"), diff --git a/theodolite/src/main/kotlin/theodolite/strategies/StrategyFactory.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/StrategyFactory.kt similarity index 88% rename from theodolite/src/main/kotlin/theodolite/strategies/StrategyFactory.kt rename to theodolite/src/main/kotlin/rocks/theodolite/core/strategies/StrategyFactory.kt index 505681716..29a30f6e1 100644 --- a/theodolite/src/main/kotlin/theodolite/strategies/StrategyFactory.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/StrategyFactory.kt @@ -1,11 +1,12 @@ -package theodolite.strategies +package rocks.theodolite.core.strategies -import theodolite.benchmark.BenchmarkExecution -import theodolite.execution.BenchmarkExecutor -import theodolite.strategies.restriction.LowerBoundRestriction -import theodolite.strategies.restriction.RestrictionStrategy -import theodolite.strategies.searchstrategy.* -import theodolite.util.Results +import rocks.theodolite.core.strategies.guessstrategy.PrevInstanceOptGuess +import rocks.theodolite.kubernetes.benchmark.BenchmarkExecution +import rocks.theodolite.core.strategies.restrictionstrategy.LowerBoundRestriction +import rocks.theodolite.core.strategies.restrictionstrategy.RestrictionStrategy +import rocks.theodolite.core.strategies.searchstrategy.* +import rocks.theodolite.kubernetes.execution.BenchmarkExecutor +import rocks.theodolite.core.util.Results /** * Factory for creating [SearchStrategy] and [RestrictionStrategy] strategies. @@ -40,7 +41,7 @@ class StrategyFactory { "Search Strategy ${searchStrategyObject.searchStrategy} for RestrictionSearch not found") } "InitialGuessSearch" -> when (searchStrategyObject.guessStrategy){ - "PrevResourceMinGuess" -> InitialGuessSearchStrategy(executor,PrevInstanceOptGuess(), results) + "PrevResourceMinGuess" -> InitialGuessSearchStrategy(executor, PrevInstanceOptGuess(), results) else -> throw IllegalArgumentException("Guess Strategy ${searchStrategyObject.guessStrategy} not found") } else -> throw IllegalArgumentException("Search Strategy $searchStrategyObject not found") diff --git a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/GuessStrategy.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/guessstrategy/GuessStrategy.kt similarity index 93% rename from theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/GuessStrategy.kt rename to theodolite/src/main/kotlin/rocks/theodolite/core/strategies/guessstrategy/GuessStrategy.kt index f243b8e40..6ab5c1b6d 100644 --- a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/GuessStrategy.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/guessstrategy/GuessStrategy.kt @@ -1,4 +1,4 @@ -package theodolite.strategies.searchstrategy +package rocks.theodolite.core.strategies.guessstrategy import io.quarkus.runtime.annotations.RegisterForReflection diff --git a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/PrevInstanceOptGuess.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/guessstrategy/PrevInstanceOptGuess.kt similarity index 94% rename from theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/PrevInstanceOptGuess.kt rename to theodolite/src/main/kotlin/rocks/theodolite/core/strategies/guessstrategy/PrevInstanceOptGuess.kt index c919b4759..3b2d7b1b0 100644 --- a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/PrevInstanceOptGuess.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/guessstrategy/PrevInstanceOptGuess.kt @@ -1,4 +1,4 @@ -package theodolite.strategies.searchstrategy +package rocks.theodolite.core.strategies.guessstrategy /** diff --git a/theodolite/src/main/kotlin/theodolite/strategies/restriction/LowerBoundRestriction.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/restrictionstrategy/LowerBoundRestriction.kt similarity index 89% rename from theodolite/src/main/kotlin/theodolite/strategies/restriction/LowerBoundRestriction.kt rename to theodolite/src/main/kotlin/rocks/theodolite/core/strategies/restrictionstrategy/LowerBoundRestriction.kt index 1203d7293..0bc64c5bf 100644 --- a/theodolite/src/main/kotlin/theodolite/strategies/restriction/LowerBoundRestriction.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/restrictionstrategy/LowerBoundRestriction.kt @@ -1,6 +1,6 @@ -package theodolite.strategies.restriction +package rocks.theodolite.core.strategies.restrictionstrategy -import theodolite.util.Results +import rocks.theodolite.core.util.Results /** * The [LowerBoundRestriction] sets the lower bound of the resources to be examined in the experiment to the value diff --git a/theodolite/src/main/kotlin/theodolite/strategies/restriction/RestrictionStrategy.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/restrictionstrategy/RestrictionStrategy.kt similarity index 91% rename from theodolite/src/main/kotlin/theodolite/strategies/restriction/RestrictionStrategy.kt rename to theodolite/src/main/kotlin/rocks/theodolite/core/strategies/restrictionstrategy/RestrictionStrategy.kt index 1ac9d201c..b4f2df641 100644 --- a/theodolite/src/main/kotlin/theodolite/strategies/restriction/RestrictionStrategy.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/restrictionstrategy/RestrictionStrategy.kt @@ -1,7 +1,7 @@ -package theodolite.strategies.restriction +package rocks.theodolite.core.strategies.restrictionstrategy import io.quarkus.runtime.annotations.RegisterForReflection -import theodolite.util.Results +import rocks.theodolite.core.util.Results /** * A 'Restriction Strategy' restricts a list of resources or loads depending on the metric based on the current diff --git a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/BinarySearch.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/BinarySearch.kt similarity index 97% rename from theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/BinarySearch.kt rename to theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/BinarySearch.kt index 6e56c3b36..2557b0255 100644 --- a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/BinarySearch.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/BinarySearch.kt @@ -1,7 +1,7 @@ -package theodolite.strategies.searchstrategy +package rocks.theodolite.core.strategies.searchstrategy import mu.KotlinLogging -import theodolite.execution.BenchmarkExecutor +import rocks.theodolite.kubernetes.execution.BenchmarkExecutor private val logger = KotlinLogging.logger {} diff --git a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/FullSearch.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/FullSearch.kt similarity index 92% rename from theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/FullSearch.kt rename to theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/FullSearch.kt index 6af6aa160..793c3cd88 100644 --- a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/FullSearch.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/FullSearch.kt @@ -1,7 +1,7 @@ -package theodolite.strategies.searchstrategy +package rocks.theodolite.core.strategies.searchstrategy import mu.KotlinLogging -import theodolite.execution.BenchmarkExecutor +import rocks.theodolite.kubernetes.execution.BenchmarkExecutor private val logger = KotlinLogging.logger {} diff --git a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/InitialGuessSearchStrategy.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/InitialGuessSearchStrategy.kt similarity index 95% rename from theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/InitialGuessSearchStrategy.kt rename to theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/InitialGuessSearchStrategy.kt index 447d81094..8e2eb997c 100644 --- a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/InitialGuessSearchStrategy.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/InitialGuessSearchStrategy.kt @@ -1,8 +1,9 @@ -package theodolite.strategies.searchstrategy +package rocks.theodolite.core.strategies.searchstrategy import mu.KotlinLogging -import theodolite.execution.BenchmarkExecutor -import theodolite.util.Results +import rocks.theodolite.core.strategies.guessstrategy.GuessStrategy +import rocks.theodolite.kubernetes.execution.BenchmarkExecutor +import rocks.theodolite.core.util.Results private val logger = KotlinLogging.logger {} diff --git a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/LinearSearch.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/LinearSearch.kt similarity index 90% rename from theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/LinearSearch.kt rename to theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/LinearSearch.kt index 1991431a9..d45909b80 100644 --- a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/LinearSearch.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/LinearSearch.kt @@ -1,7 +1,7 @@ -package theodolite.strategies.searchstrategy +package rocks.theodolite.core.strategies.searchstrategy import mu.KotlinLogging -import theodolite.execution.BenchmarkExecutor +import rocks.theodolite.kubernetes.execution.BenchmarkExecutor private val logger = KotlinLogging.logger {} diff --git a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/RestrictionSearch.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/RestrictionSearch.kt similarity index 80% rename from theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/RestrictionSearch.kt rename to theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/RestrictionSearch.kt index 0a136d6ff..a2d2ba55b 100644 --- a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/RestrictionSearch.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/RestrictionSearch.kt @@ -1,8 +1,8 @@ -package theodolite.strategies.searchstrategy +package rocks.theodolite.core.strategies.searchstrategy import io.quarkus.runtime.annotations.RegisterForReflection -import theodolite.execution.BenchmarkExecutor -import theodolite.strategies.restriction.RestrictionStrategy +import rocks.theodolite.core.strategies.restrictionstrategy.RestrictionStrategy +import rocks.theodolite.kubernetes.execution.BenchmarkExecutor /** * Strategy that combines a SearchStrategy and a set of RestrictionStrategy. @@ -14,9 +14,9 @@ import theodolite.strategies.restriction.RestrictionStrategy */ @RegisterForReflection class RestrictionSearch( - benchmarkExecutor: BenchmarkExecutor, - private val searchStrategy: SearchStrategy, - private val restrictionStrategies: Set<RestrictionStrategy> + benchmarkExecutor: BenchmarkExecutor, + private val searchStrategy: SearchStrategy, + private val restrictionStrategies: Set<RestrictionStrategy> ) : SearchStrategy(benchmarkExecutor) { /** diff --git a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/SearchStrategy.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/SearchStrategy.kt similarity index 93% rename from theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/SearchStrategy.kt rename to theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/SearchStrategy.kt index 962504c7d..76a70d286 100644 --- a/theodolite/src/main/kotlin/theodolite/strategies/searchstrategy/SearchStrategy.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/strategies/searchstrategy/SearchStrategy.kt @@ -1,9 +1,8 @@ -package theodolite.strategies.searchstrategy +package rocks.theodolite.core.strategies.searchstrategy import io.quarkus.runtime.annotations.RegisterForReflection -import theodolite.execution.BenchmarkExecutor -import theodolite.strategies.Metric -import theodolite.util.Results +import rocks.theodolite.core.strategies.Metric +import rocks.theodolite.kubernetes.execution.BenchmarkExecutor /** * Base class for the implementation for SearchStrategies. SearchStrategies determine the smallest suitable number diff --git a/theodolite/src/main/kotlin/theodolite/util/Config.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/util/Config.kt similarity index 76% rename from theodolite/src/main/kotlin/theodolite/util/Config.kt rename to theodolite/src/main/kotlin/rocks/theodolite/core/util/Config.kt index 675caea5f..c32c649a6 100644 --- a/theodolite/src/main/kotlin/theodolite/util/Config.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/util/Config.kt @@ -1,8 +1,9 @@ -package theodolite.util +package rocks.theodolite.core.util import io.quarkus.runtime.annotations.RegisterForReflection -import theodolite.strategies.Metric -import theodolite.strategies.searchstrategy.SearchStrategy +import rocks.theodolite.core.strategies.Metric +import rocks.theodolite.core.strategies.searchstrategy.SearchStrategy +import rocks.theodolite.kubernetes.util.PatcherDefinition /** * Config class that represents a configuration of a theodolite run. diff --git a/theodolite/src/main/kotlin/theodolite/util/IOHandler.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/util/IOHandler.kt similarity index 98% rename from theodolite/src/main/kotlin/theodolite/util/IOHandler.kt rename to theodolite/src/main/kotlin/rocks/theodolite/core/util/IOHandler.kt index 8b580c733..b5e19a29b 100644 --- a/theodolite/src/main/kotlin/theodolite/util/IOHandler.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/util/IOHandler.kt @@ -1,4 +1,4 @@ -package theodolite.util +package rocks.theodolite.core.util import com.google.gson.GsonBuilder import mu.KotlinLogging diff --git a/theodolite/src/main/kotlin/theodolite/util/Results.kt b/theodolite/src/main/kotlin/rocks/theodolite/core/util/Results.kt similarity index 98% rename from theodolite/src/main/kotlin/theodolite/util/Results.kt rename to theodolite/src/main/kotlin/rocks/theodolite/core/util/Results.kt index b255ec73c..5dc4c7512 100644 --- a/theodolite/src/main/kotlin/theodolite/util/Results.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/core/util/Results.kt @@ -1,7 +1,7 @@ -package theodolite.util +package rocks.theodolite.core.util import io.quarkus.runtime.annotations.RegisterForReflection -import theodolite.strategies.Metric +import rocks.theodolite.core.strategies.Metric /** * Central class that saves the state of an execution of Theodolite. For an execution, it is used to save the result of diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/Action.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Action.kt similarity index 87% rename from theodolite/src/main/kotlin/theodolite/benchmark/Action.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Action.kt index 35efebdc0..ea4a94eb4 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/Action.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Action.kt @@ -1,11 +1,12 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.benchmark 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 theodolite.util.ActionCommandFailedException -import theodolite.util.Configuration +import rocks.theodolite.kubernetes.util.Configuration +import rocks.theodolite.kubernetes.util.exception.ActionCommandFailedException + @JsonDeserialize @RegisterForReflection diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/ActionCommand.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/ActionCommand.kt similarity index 94% rename from theodolite/src/main/kotlin/theodolite/benchmark/ActionCommand.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/ActionCommand.kt index 966fa5632..c716b57e3 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/ActionCommand.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/ActionCommand.kt @@ -1,4 +1,4 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.benchmark import io.fabric8.kubernetes.api.model.Status import io.fabric8.kubernetes.client.KubernetesClientException @@ -8,8 +8,8 @@ import io.fabric8.kubernetes.client.dsl.ExecWatch import io.fabric8.kubernetes.client.utils.Serialization import mu.KotlinLogging import okhttp3.Response -import theodolite.util.ActionCommandFailedException -import theodolite.util.Configuration +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 @@ -34,10 +34,10 @@ class ActionCommand(val client: NamespacedKubernetesClient) { * @return the exit code of this executed command */ fun exec( - matchLabels: MutableMap<String, String>, - command: Array<String>, - timeout: Long = Configuration.TIMEOUT_SECONDS, - container: String = "" + matchLabels: MutableMap<String, String>, + command: Array<String>, + timeout: Long = Configuration.TIMEOUT_SECONDS, + container: String = "" ): Int { try { val execWatch: ExecWatch = if (container.isNotEmpty()) { diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/Benchmark.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Benchmark.kt similarity index 83% rename from theodolite/src/main/kotlin/theodolite/benchmark/Benchmark.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Benchmark.kt index f2b587cba..7b7572187 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/Benchmark.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Benchmark.kt @@ -1,8 +1,8 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.benchmark import io.quarkus.runtime.annotations.RegisterForReflection -import theodolite.util.ConfigurationOverride -import theodolite.util.PatcherDefinition +import rocks.theodolite.kubernetes.util.ConfigurationOverride +import rocks.theodolite.kubernetes.util.PatcherDefinition /** * A Benchmark contains: diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/BenchmarkDeployment.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/BenchmarkDeployment.kt similarity index 92% rename from theodolite/src/main/kotlin/theodolite/benchmark/BenchmarkDeployment.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/BenchmarkDeployment.kt index fd01ecd98..0281726b9 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/BenchmarkDeployment.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/BenchmarkDeployment.kt @@ -1,4 +1,4 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.benchmark /** * A BenchmarkDeployment contains the necessary infrastructure to execute a benchmark. diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/BenchmarkExecution.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/BenchmarkExecution.kt similarity index 97% rename from theodolite/src/main/kotlin/theodolite/benchmark/BenchmarkExecution.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/BenchmarkExecution.kt index 13c98d701..e7daa0a41 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/BenchmarkExecution.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/BenchmarkExecution.kt @@ -1,9 +1,9 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.benchmark import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.fabric8.kubernetes.api.model.KubernetesResource import io.quarkus.runtime.annotations.RegisterForReflection -import theodolite.util.ConfigurationOverride +import rocks.theodolite.kubernetes.util.ConfigurationOverride import kotlin.properties.Delegates /** diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/ConfigMapResourceSet.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/ConfigMapResourceSet.kt similarity index 90% rename from theodolite/src/main/kotlin/theodolite/benchmark/ConfigMapResourceSet.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/ConfigMapResourceSet.kt index f85b83497..d56783566 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/ConfigMapResourceSet.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/ConfigMapResourceSet.kt @@ -1,13 +1,13 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.benchmark import com.fasterxml.jackson.databind.annotation.JsonDeserialize 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 theodolite.k8s.resourceLoader.K8sResourceLoaderFromString -import theodolite.util.DeploymentFailedException -import theodolite.util.YamlParserFromString +import rocks.theodolite.kubernetes.k8s.resourceLoader.K8sResourceLoaderFromString +import rocks.theodolite.kubernetes.util.YamlParserFromString +import rocks.theodolite.kubernetes.util.exception.DeploymentFailedException import java.lang.IllegalArgumentException @RegisterForReflection diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/FileSystemResourceSet.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/FileSystemResourceSet.kt similarity index 89% rename from theodolite/src/main/kotlin/theodolite/benchmark/FileSystemResourceSet.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/FileSystemResourceSet.kt index f830232de..5e15ae286 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/FileSystemResourceSet.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/FileSystemResourceSet.kt @@ -1,12 +1,12 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.benchmark import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.quarkus.runtime.annotations.RegisterForReflection -import theodolite.k8s.resourceLoader.K8sResourceLoaderFromFile -import theodolite.util.DeploymentFailedException -import theodolite.util.YamlParserFromFile +import rocks.theodolite.kubernetes.k8s.resourceLoader.K8sResourceLoaderFromFile +import rocks.theodolite.kubernetes.util.YamlParserFromFile +import rocks.theodolite.kubernetes.util.exception.DeploymentFailedException import java.io.File import java.io.FileNotFoundException import java.lang.IllegalArgumentException diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmark.kt similarity index 92% rename from theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmark.kt index 52df845cc..66578c89d 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmark.kt @@ -1,4 +1,4 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.benchmark import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.fabric8.kubernetes.api.model.KubernetesResource @@ -6,10 +6,13 @@ import io.fabric8.kubernetes.client.DefaultKubernetesClient import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.quarkus.runtime.annotations.RegisterForReflection import mu.KotlinLogging -import theodolite.k8s.K8sManager -import theodolite.k8s.resourceLoader.K8sResourceLoader -import theodolite.patcher.PatcherFactory -import theodolite.util.* +import rocks.theodolite.kubernetes.k8s.K8sManager +import rocks.theodolite.kubernetes.k8s.resourceLoader.K8sResourceLoader +import rocks.theodolite.kubernetes.util.ConfigurationOverride +import rocks.theodolite.kubernetes.model.crd.KafkaConfig +import rocks.theodolite.kubernetes.patcher.PatcherFactory +import rocks.theodolite.kubernetes.util.PatcherDefinition +import rocks.theodolite.kubernetes.util.TypeName private val logger = KotlinLogging.logger {} diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeployment.kt similarity index 76% rename from theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeployment.kt index 2b3cf0fa1..ab1b701ba 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeployment.kt @@ -1,14 +1,14 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.benchmark import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.quarkus.runtime.annotations.RegisterForReflection import mu.KotlinLogging import org.apache.kafka.clients.admin.NewTopic -import theodolite.k8s.K8sManager -import theodolite.k8s.ResourceByLabelHandler -import theodolite.k8s.TopicManager -import theodolite.util.KafkaConfig +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 private val logger = KotlinLogging.logger {} @@ -23,17 +23,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<KubernetesResource>, - val loadGenResources: List<KubernetesResource>, - 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<KubernetesResource>, + val loadGenResources: List<KubernetesResource>, + 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/theodolite/benchmark/ResourceSet.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/ResourceSet.kt similarity index 90% rename from theodolite/src/main/kotlin/theodolite/benchmark/ResourceSet.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/ResourceSet.kt index 19fc85845..936fab2ba 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/ResourceSet.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/ResourceSet.kt @@ -1,4 +1,4 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.benchmark import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.fabric8.kubernetes.api.model.KubernetesResource diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/ResourceSets.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/ResourceSets.kt similarity index 90% rename from theodolite/src/main/kotlin/theodolite/benchmark/ResourceSets.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/ResourceSets.kt index b63649497..8e019dd80 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/ResourceSets.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/ResourceSets.kt @@ -1,4 +1,4 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.benchmark import com.fasterxml.jackson.annotation.JsonInclude import com.fasterxml.jackson.annotation.JsonProperty @@ -6,7 +6,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.quarkus.runtime.annotations.RegisterForReflection -import theodolite.util.DeploymentFailedException +import rocks.theodolite.kubernetes.util.exception.DeploymentFailedException @JsonDeserialize @RegisterForReflection diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/Resources.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Resources.kt similarity index 87% rename from theodolite/src/main/kotlin/theodolite/benchmark/Resources.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Resources.kt index fccbd2c41..b65b5ffb7 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/Resources.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Resources.kt @@ -1,4 +1,4 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.benchmark import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.quarkus.runtime.annotations.RegisterForReflection diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/Slo.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Slo.kt similarity index 95% rename from theodolite/src/main/kotlin/theodolite/benchmark/Slo.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Slo.kt index c9aac4a1b..8a9c96138 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/Slo.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Slo.kt @@ -1,4 +1,4 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.benchmark import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.fabric8.kubernetes.api.model.KubernetesResource diff --git a/theodolite/src/main/kotlin/theodolite/execution/BenchmarkExecutor.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/BenchmarkExecutor.kt similarity index 65% rename from theodolite/src/main/kotlin/theodolite/execution/BenchmarkExecutor.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/BenchmarkExecutor.kt index 9ae267f42..ab1708bd7 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/BenchmarkExecutor.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/BenchmarkExecutor.kt @@ -1,11 +1,11 @@ -package theodolite.execution +package rocks.theodolite.kubernetes.execution import mu.KotlinLogging -import theodolite.benchmark.Benchmark -import theodolite.benchmark.Slo -import theodolite.util.ConfigurationOverride -import theodolite.util.PatcherDefinition -import theodolite.util.Results +import rocks.theodolite.core.util.Results +import rocks.theodolite.kubernetes.benchmark.Benchmark +import rocks.theodolite.kubernetes.benchmark.Slo +import rocks.theodolite.kubernetes.util.ConfigurationOverride +import rocks.theodolite.kubernetes.util.PatcherDefinition import java.time.Duration import java.util.concurrent.atomic.AtomicBoolean @@ -20,18 +20,18 @@ private val logger = KotlinLogging.logger {} * @constructor Create empty Benchmark executor */ abstract class BenchmarkExecutor( - val benchmark: Benchmark, - val results: Results, - val executionDuration: Duration, - val configurationOverrides: List<ConfigurationOverride?>, - val slos: List<Slo>, - val repetitions: Int, - val executionId: Int, - val loadGenerationDelay: Long, - val afterTeardownDelay: Long, - val executionName: String, - val loadPatcherDefinitions: List<PatcherDefinition>, - val resourcePatcherDefinitions: List<PatcherDefinition> + val benchmark: Benchmark, + val results: Results, + val executionDuration: Duration, + val configurationOverrides: List<ConfigurationOverride?>, + val slos: List<Slo>, + val repetitions: Int, + val executionId: Int, + val loadGenerationDelay: Long, + val afterTeardownDelay: Long, + val executionName: String, + val loadPatcherDefinitions: List<PatcherDefinition>, + val resourcePatcherDefinitions: List<PatcherDefinition> ) { var run: AtomicBoolean = AtomicBoolean(true) diff --git a/theodolite/src/main/kotlin/theodolite/execution/BenchmarkExecutorImpl.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/BenchmarkExecutorImpl.kt similarity index 88% rename from theodolite/src/main/kotlin/theodolite/execution/BenchmarkExecutorImpl.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/BenchmarkExecutorImpl.kt index bf7df85b8..2bda76f8e 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/BenchmarkExecutorImpl.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/BenchmarkExecutorImpl.kt @@ -1,12 +1,16 @@ -package theodolite.execution +package rocks.theodolite.kubernetes.execution import io.quarkus.runtime.annotations.RegisterForReflection import mu.KotlinLogging -import theodolite.benchmark.Benchmark -import theodolite.benchmark.Slo -import theodolite.evaluation.AnalysisExecutor -import theodolite.execution.operator.EventCreator -import theodolite.util.* +import rocks.theodolite.core.util.Results +import rocks.theodolite.kubernetes.benchmark.Benchmark +import rocks.theodolite.kubernetes.benchmark.Slo +import rocks.theodolite.kubernetes.util.ConfigurationOverride +import rocks.theodolite.kubernetes.execution.operator.EventCreator +import rocks.theodolite.kubernetes.slo.evaluation.AnalysisExecutor +import rocks.theodolite.kubernetes.util.Configuration +import rocks.theodolite.kubernetes.util.PatcherDefinition +import rocks.theodolite.kubernetes.util.exception.ExecutionFailedException import java.time.Duration import java.time.Instant diff --git a/theodolite/src/main/kotlin/theodolite/execution/ExecutionModes.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/ExecutionModes.kt similarity index 69% rename from theodolite/src/main/kotlin/theodolite/execution/ExecutionModes.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/ExecutionModes.kt index 370b87e06..5c3f77e58 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/ExecutionModes.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/ExecutionModes.kt @@ -1,4 +1,4 @@ -package theodolite.execution +package rocks.theodolite.kubernetes.execution enum class ExecutionModes(val value: String) { OPERATOR("operator"), diff --git a/theodolite/src/main/kotlin/theodolite/execution/Main.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/Main.kt similarity index 73% rename from theodolite/src/main/kotlin/theodolite/execution/Main.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/Main.kt index 17b3d4e7b..4dcece038 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/Main.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/Main.kt @@ -1,9 +1,10 @@ -package theodolite.execution +package rocks.theodolite.kubernetes.execution import io.quarkus.runtime.annotations.QuarkusMain import mu.KotlinLogging -import theodolite.execution.operator.TheodoliteOperator -import theodolite.util.Configuration +import rocks.theodolite.kubernetes.execution.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/theodolite/execution/Shutdown.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/Shutdown.kt similarity index 89% rename from theodolite/src/main/kotlin/theodolite/execution/Shutdown.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/Shutdown.kt index cdfe68e7a..50b891b88 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/Shutdown.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/Shutdown.kt @@ -1,8 +1,8 @@ -package theodolite.execution +package rocks.theodolite.kubernetes.execution import mu.KotlinLogging -import theodolite.benchmark.BenchmarkExecution -import theodolite.benchmark.KubernetesBenchmark +import rocks.theodolite.kubernetes.benchmark.BenchmarkExecution +import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmark private val logger = KotlinLogging.logger {} diff --git a/theodolite/src/main/kotlin/theodolite/execution/SloFactory.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/SloFactory.kt similarity index 75% rename from theodolite/src/main/kotlin/theodolite/execution/SloFactory.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/SloFactory.kt index b990828fa..dd155bb33 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/SloFactory.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/SloFactory.kt @@ -1,8 +1,8 @@ -package theodolite.execution +package rocks.theodolite.kubernetes.execution -import theodolite.benchmark.BenchmarkExecution -import theodolite.benchmark.KubernetesBenchmark -import theodolite.benchmark.Slo +import rocks.theodolite.kubernetes.benchmark.BenchmarkExecution +import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmark +import rocks.theodolite.kubernetes.benchmark.Slo class SloFactory { diff --git a/theodolite/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/TheodoliteExecutor.kt similarity index 93% rename from theodolite/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/TheodoliteExecutor.kt index 4e378c711..f1b75e83d 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/TheodoliteExecutor.kt @@ -1,12 +1,14 @@ -package theodolite.execution +package rocks.theodolite.kubernetes.execution import mu.KotlinLogging -import theodolite.benchmark.BenchmarkExecution -import theodolite.benchmark.KubernetesBenchmark -import theodolite.patcher.PatcherDefinitionFactory -import theodolite.strategies.Metric -import theodolite.strategies.StrategyFactory -import theodolite.util.* +import rocks.theodolite.kubernetes.benchmark.BenchmarkExecution +import rocks.theodolite.kubernetes.patcher.PatcherDefinitionFactory +import rocks.theodolite.core.strategies.Metric +import rocks.theodolite.core.strategies.StrategyFactory +import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmark +import rocks.theodolite.core.util.Config +import rocks.theodolite.core.util.IOHandler +import rocks.theodolite.core.util.Results import java.io.File import java.time.Duration diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/AbstractStateHandler.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/AbstractStateHandler.kt similarity index 97% rename from theodolite/src/main/kotlin/theodolite/execution/operator/AbstractStateHandler.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/AbstractStateHandler.kt index 93536282e..4e0c5afa5 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/AbstractStateHandler.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/AbstractStateHandler.kt @@ -1,4 +1,4 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.execution.operator import io.fabric8.kubernetes.api.model.HasMetadata import io.fabric8.kubernetes.api.model.KubernetesResourceList diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/BenchmarkStateChecker.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/BenchmarkStateChecker.kt similarity index 90% rename from theodolite/src/main/kotlin/theodolite/execution/operator/BenchmarkStateChecker.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/BenchmarkStateChecker.kt index 6dcfb5826..fede7358f 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/BenchmarkStateChecker.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/BenchmarkStateChecker.kt @@ -1,22 +1,22 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.execution.operator import io.fabric8.kubernetes.api.model.apps.Deployment 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 theodolite.benchmark.Action -import theodolite.benchmark.ActionSelector -import theodolite.benchmark.KubernetesBenchmark -import theodolite.benchmark.ResourceSets -import theodolite.model.crd.BenchmarkCRD -import theodolite.model.crd.BenchmarkState -import theodolite.model.crd.KubernetesBenchmarkList +import rocks.theodolite.kubernetes.benchmark.Action +import rocks.theodolite.kubernetes.benchmark.ActionSelector +import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmark +import rocks.theodolite.kubernetes.benchmark.ResourceSets +import rocks.theodolite.kubernetes.model.crd.BenchmarkCRD +import rocks.theodolite.kubernetes.model.crd.BenchmarkState +import rocks.theodolite.kubernetes.model.crd.KubernetesBenchmarkList class BenchmarkStateChecker( - private val benchmarkCRDClient: MixedOperation<BenchmarkCRD, KubernetesBenchmarkList, Resource<BenchmarkCRD>>, - private val benchmarkStateHandler: BenchmarkStateHandler, - private val client: NamespacedKubernetesClient + private val benchmarkCRDClient: MixedOperation<BenchmarkCRD, KubernetesBenchmarkList, Resource<BenchmarkCRD>>, + private val benchmarkStateHandler: BenchmarkStateHandler, + private val client: NamespacedKubernetesClient ) { diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/BenchmarkStateHandler.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/BenchmarkStateHandler.kt similarity index 80% rename from theodolite/src/main/kotlin/theodolite/execution/operator/BenchmarkStateHandler.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/BenchmarkStateHandler.kt index 3b4685973..af14fc32c 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/BenchmarkStateHandler.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/BenchmarkStateHandler.kt @@ -1,7 +1,9 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.execution.operator import io.fabric8.kubernetes.client.NamespacedKubernetesClient -import theodolite.model.crd.* +import rocks.theodolite.kubernetes.model.crd.BenchmarkCRD +import rocks.theodolite.kubernetes.model.crd.BenchmarkState +import rocks.theodolite.kubernetes.model.crd.ExecutionState class BenchmarkStateHandler(val client: NamespacedKubernetesClient) : AbstractStateHandler<BenchmarkCRD>( diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/ClusterSetup.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/ClusterSetup.kt similarity index 75% rename from theodolite/src/main/kotlin/theodolite/execution/operator/ClusterSetup.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/ClusterSetup.kt index 885315df6..540943be4 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/ClusterSetup.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/ClusterSetup.kt @@ -1,17 +1,18 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.execution.operator import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.fabric8.kubernetes.client.dsl.MixedOperation import io.fabric8.kubernetes.client.dsl.Resource -import theodolite.execution.Shutdown -import theodolite.k8s.K8sContextFactory -import theodolite.k8s.ResourceByLabelHandler -import theodolite.model.crd.* +import rocks.theodolite.kubernetes.k8s.K8sContextFactory +import rocks.theodolite.kubernetes.k8s.ResourceByLabelHandler +import rocks.theodolite.kubernetes.model.crd.* +import rocks.theodolite.kubernetes.execution.Shutdown + class ClusterSetup( - private val executionCRDClient: MixedOperation<ExecutionCRD, BenchmarkExecutionList, Resource<ExecutionCRD>>, - private val benchmarkCRDClient: MixedOperation<BenchmarkCRD, KubernetesBenchmarkList, Resource<BenchmarkCRD>>, - private val client: NamespacedKubernetesClient + private val executionCRDClient: MixedOperation<ExecutionCRD, BenchmarkExecutionList, Resource<ExecutionCRD>>, + private val benchmarkCRDClient: MixedOperation<BenchmarkCRD, KubernetesBenchmarkList, Resource<BenchmarkCRD>>, + private val client: NamespacedKubernetesClient ) { private val serviceMonitorContext = K8sContextFactory().create( @@ -61,23 +62,23 @@ class ClusterSetup( val resourceRemover = ResourceByLabelHandler(client = client) resourceRemover.removeServices( labelName = "app.kubernetes.io/created-by", - labelValue = "theodolite" + labelValue = "rocks/theodolitedolite" ) resourceRemover.removeDeployments( labelName = "app.kubernetes.io/created-by", - labelValue = "theodolite" + labelValue = "rocks/theodolitedolite" ) resourceRemover.removeStatefulSets( labelName = "app.kubernetes.io/created-by", - labelValue = "theodolite" + labelValue = "rocks/theodolitedolite" ) resourceRemover.removeConfigMaps( labelName = "app.kubernetes.io/created-by", - labelValue = "theodolite" + labelValue = "rocks/theodolitedolite" ) resourceRemover.removeCR( labelName = "app.kubernetes.io/created-by", - labelValue = "theodolite", + labelValue = "rocks/theodolitedolite", context = serviceMonitorContext ) } diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/EventCreator.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/EventCreator.kt similarity index 95% rename from theodolite/src/main/kotlin/theodolite/execution/operator/EventCreator.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/EventCreator.kt index fab098ebd..7519e3fb2 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/EventCreator.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/EventCreator.kt @@ -1,4 +1,4 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.execution.operator import io.fabric8.kubernetes.api.model.EventBuilder import io.fabric8.kubernetes.api.model.EventSource @@ -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 theodolite.util.Configuration +import rocks.theodolite.kubernetes.util.Configuration import java.time.Instant import java.util.* import kotlin.NoSuchElementException diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/ExecutionEventHandler.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/ExecutionEventHandler.kt similarity index 90% rename from theodolite/src/main/kotlin/theodolite/execution/operator/ExecutionEventHandler.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/ExecutionEventHandler.kt index 25c627a35..92bd3eb51 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/ExecutionEventHandler.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/ExecutionEventHandler.kt @@ -1,11 +1,12 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.execution.operator import com.google.gson.Gson import com.google.gson.GsonBuilder import io.fabric8.kubernetes.client.informers.ResourceEventHandler import mu.KotlinLogging -import theodolite.benchmark.BenchmarkExecution -import theodolite.model.crd.* +import rocks.theodolite.kubernetes.benchmark.BenchmarkExecution +import rocks.theodolite.kubernetes.model.crd.ExecutionCRD +import rocks.theodolite.kubernetes.model.crd.ExecutionState private val logger = KotlinLogging.logger {} @@ -18,8 +19,8 @@ private val logger = KotlinLogging.logger {} * @see BenchmarkExecution */ class ExecutionEventHandler( - private val controller: TheodoliteController, - private val stateHandler: ExecutionStateHandler + private val controller: TheodoliteController, + private val stateHandler: ExecutionStateHandler ) : ResourceEventHandler<ExecutionCRD> { private val gson: Gson = GsonBuilder().enableComplexMapKeySerialization().create() diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/ExecutionStateHandler.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/ExecutionStateHandler.kt similarity index 91% rename from theodolite/src/main/kotlin/theodolite/execution/operator/ExecutionStateHandler.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/ExecutionStateHandler.kt index 340044e5b..8b4bc0451 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/ExecutionStateHandler.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/ExecutionStateHandler.kt @@ -1,9 +1,9 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.execution.operator import io.fabric8.kubernetes.api.model.MicroTime import io.fabric8.kubernetes.client.NamespacedKubernetesClient -import theodolite.model.crd.ExecutionCRD -import theodolite.model.crd.ExecutionState +import rocks.theodolite.kubernetes.model.crd.ExecutionCRD +import rocks.theodolite.kubernetes.model.crd.ExecutionState import java.lang.Thread.sleep import java.time.Instant import java.util.concurrent.atomic.AtomicBoolean diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/LeaderElector.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/LeaderElector.kt similarity index 96% rename from theodolite/src/main/kotlin/theodolite/execution/operator/LeaderElector.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/LeaderElector.kt index 1ce94c2fd..0d7793b57 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/LeaderElector.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/LeaderElector.kt @@ -1,4 +1,4 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.execution.operator import io.fabric8.kubernetes.client.DefaultKubernetesClient import io.fabric8.kubernetes.client.NamespacedKubernetesClient diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/StateHandler.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/StateHandler.kt similarity index 88% rename from theodolite/src/main/kotlin/theodolite/execution/operator/StateHandler.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/StateHandler.kt index 28563ac5a..8baaff422 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/StateHandler.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/StateHandler.kt @@ -1,4 +1,4 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.execution.operator private const val MAX_RETRIES: Int = 5 diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/TheodoliteController.kt similarity index 85% rename from theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/TheodoliteController.kt index 5f4180b0b..cb5ac0aa1 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/TheodoliteController.kt @@ -1,21 +1,24 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.execution.operator import io.fabric8.kubernetes.client.dsl.MixedOperation import io.fabric8.kubernetes.client.dsl.Resource import mu.KotlinLogging -import theodolite.benchmark.BenchmarkExecution -import theodolite.benchmark.KubernetesBenchmark -import theodolite.execution.TheodoliteExecutor -import theodolite.model.crd.* -import theodolite.patcher.ConfigOverrideModifier -import theodolite.util.ExecutionStateComparator +import rocks.theodolite.kubernetes.benchmark.BenchmarkExecution +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.benchmark.KubernetesBenchmark +import rocks.theodolite.kubernetes.execution.TheodoliteExecutor +import rocks.theodolite.kubernetes.model.crd.* +import rocks.theodolite.kubernetes.patcher.ConfigOverrideModifier +import rocks.theodolite.kubernetes.util.ExecutionStateComparator import java.lang.Thread.sleep private val logger = KotlinLogging.logger {} const val DEPLOYED_FOR_EXECUTION_LABEL_NAME = "deployed-for-execution" const val DEPLOYED_FOR_BENCHMARK_LABEL_NAME = "deployed-for-benchmark" const val CREATED_BY_LABEL_NAME = "app.kubernetes.io/created-by" -const val CREATED_BY_LABEL_VALUE = "theodolite" +const val CREATED_BY_LABEL_VALUE = "rocks/theodolitedolite" /** * The controller implementation for Theodolite. @@ -25,10 +28,10 @@ const val CREATED_BY_LABEL_VALUE = "theodolite" */ class TheodoliteController( - private val executionCRDClient: MixedOperation<ExecutionCRD, BenchmarkExecutionList, Resource<ExecutionCRD>>, - private val benchmarkCRDClient: MixedOperation<BenchmarkCRD, KubernetesBenchmarkList, Resource<BenchmarkCRD>>, - private val executionStateHandler: ExecutionStateHandler, - private val benchmarkStateChecker: BenchmarkStateChecker + private val executionCRDClient: MixedOperation<ExecutionCRD, BenchmarkExecutionList, Resource<ExecutionCRD>>, + private val benchmarkCRDClient: MixedOperation<BenchmarkCRD, KubernetesBenchmarkList, Resource<BenchmarkCRD>>, + private val executionStateHandler: ExecutionStateHandler, + private val benchmarkStateChecker: BenchmarkStateChecker ) { lateinit var executor: TheodoliteExecutor diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteOperator.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/TheodoliteOperator.kt similarity index 89% rename from theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteOperator.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/TheodoliteOperator.kt index 071bd0607..1eb68b781 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteOperator.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/operator/TheodoliteOperator.kt @@ -1,4 +1,4 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.execution.operator import io.fabric8.kubernetes.client.DefaultKubernetesClient import io.fabric8.kubernetes.client.NamespacedKubernetesClient @@ -7,11 +7,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 theodolite.model.crd.BenchmarkCRD -import theodolite.model.crd.BenchmarkExecutionList -import theodolite.model.crd.ExecutionCRD -import theodolite.model.crd.KubernetesBenchmarkList -import theodolite.util.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 DEFAULT_NAMESPACE = "default" @@ -81,8 +81,8 @@ class TheodoliteOperator { } fun getExecutionEventHandler( - controller: TheodoliteController, - client: NamespacedKubernetesClient + controller: TheodoliteController, + client: NamespacedKubernetesClient ): SharedInformerFactory { val factory = client.informers() .inNamespace(client.namespace) @@ -125,9 +125,9 @@ class TheodoliteOperator { fun getController( - client: NamespacedKubernetesClient, - executionStateHandler: ExecutionStateHandler, - benchmarkStateChecker: BenchmarkStateChecker + client: NamespacedKubernetesClient, + executionStateHandler: ExecutionStateHandler, + benchmarkStateChecker: BenchmarkStateChecker ): TheodoliteController { if (!::controller.isInitialized) { this.controller = TheodoliteController( diff --git a/theodolite/src/main/kotlin/theodolite/k8s/CustomResourceWrapper.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/CustomResourceWrapper.kt similarity index 97% rename from theodolite/src/main/kotlin/theodolite/k8s/CustomResourceWrapper.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/CustomResourceWrapper.kt index 797ed8838..64cc40511 100644 --- a/theodolite/src/main/kotlin/theodolite/k8s/CustomResourceWrapper.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/CustomResourceWrapper.kt @@ -1,4 +1,4 @@ -package theodolite.k8s +package rocks.theodolite.kubernetes.k8s import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.client.NamespacedKubernetesClient diff --git a/theodolite/src/main/kotlin/theodolite/k8s/K8sContextFactory.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/K8sContextFactory.kt similarity index 95% rename from theodolite/src/main/kotlin/theodolite/k8s/K8sContextFactory.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/K8sContextFactory.kt index 7eb209bfb..1c29891f2 100644 --- a/theodolite/src/main/kotlin/theodolite/k8s/K8sContextFactory.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/K8sContextFactory.kt @@ -1,4 +1,4 @@ -package theodolite.k8s +package rocks.theodolite.kubernetes.k8s import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext diff --git a/theodolite/src/main/kotlin/theodolite/k8s/K8sManager.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/K8sManager.kt similarity index 98% rename from theodolite/src/main/kotlin/theodolite/k8s/K8sManager.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/K8sManager.kt index 389d5eefa..b02aea43e 100644 --- a/theodolite/src/main/kotlin/theodolite/k8s/K8sManager.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/K8sManager.kt @@ -1,4 +1,4 @@ -package theodolite.k8s +package rocks.theodolite.kubernetes.k8s import io.fabric8.kubernetes.api.model.ConfigMap import io.fabric8.kubernetes.api.model.KubernetesResource diff --git a/theodolite/src/main/kotlin/theodolite/k8s/ResourceByLabelHandler.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/ResourceByLabelHandler.kt similarity index 98% rename from theodolite/src/main/kotlin/theodolite/k8s/ResourceByLabelHandler.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/ResourceByLabelHandler.kt index 518b8eae2..ef3d56d0b 100644 --- a/theodolite/src/main/kotlin/theodolite/k8s/ResourceByLabelHandler.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/ResourceByLabelHandler.kt @@ -1,4 +1,4 @@ -package theodolite.k8s +package rocks.theodolite.kubernetes.k8s import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext diff --git a/theodolite/src/main/kotlin/theodolite/k8s/resourceLoader/AbstractK8sLoader.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/resourceLoader/AbstractK8sLoader.kt similarity index 96% rename from theodolite/src/main/kotlin/theodolite/k8s/resourceLoader/AbstractK8sLoader.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/resourceLoader/AbstractK8sLoader.kt index 36cfef9ce..55a21a17b 100644 --- a/theodolite/src/main/kotlin/theodolite/k8s/resourceLoader/AbstractK8sLoader.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/resourceLoader/AbstractK8sLoader.kt @@ -1,8 +1,8 @@ -package theodolite.k8s.resourceLoader +package rocks.theodolite.kubernetes.k8s.resourceLoader import io.fabric8.kubernetes.api.model.KubernetesResource import mu.KotlinLogging -import theodolite.k8s.K8sContextFactory +import rocks.theodolite.kubernetes.k8s.K8sContextFactory private val logger = KotlinLogging.logger {} diff --git a/theodolite/src/main/kotlin/theodolite/k8s/resourceLoader/K8sResourceLoader.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/resourceLoader/K8sResourceLoader.kt similarity index 93% rename from theodolite/src/main/kotlin/theodolite/k8s/resourceLoader/K8sResourceLoader.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/resourceLoader/K8sResourceLoader.kt index 1487b64bf..c3f8b14a8 100644 --- a/theodolite/src/main/kotlin/theodolite/k8s/resourceLoader/K8sResourceLoader.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/resourceLoader/K8sResourceLoader.kt @@ -1,4 +1,4 @@ -package theodolite.k8s.resourceLoader +package rocks.theodolite.kubernetes.k8s.resourceLoader import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext diff --git a/theodolite/src/main/kotlin/theodolite/k8s/resourceLoader/K8sResourceLoaderFromFile.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/resourceLoader/K8sResourceLoaderFromFile.kt similarity index 92% rename from theodolite/src/main/kotlin/theodolite/k8s/resourceLoader/K8sResourceLoaderFromFile.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/resourceLoader/K8sResourceLoaderFromFile.kt index 08f34e1d6..eaf89d485 100644 --- a/theodolite/src/main/kotlin/theodolite/k8s/resourceLoader/K8sResourceLoaderFromFile.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/resourceLoader/K8sResourceLoaderFromFile.kt @@ -1,4 +1,4 @@ -package theodolite.k8s.resourceLoader +package rocks.theodolite.kubernetes.k8s.resourceLoader import io.fabric8.kubernetes.api.model.ConfigMap import io.fabric8.kubernetes.api.model.KubernetesResource @@ -6,8 +6,8 @@ import io.fabric8.kubernetes.api.model.Service import io.fabric8.kubernetes.api.model.apps.Deployment import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext -import theodolite.k8s.CustomResourceWrapper -import theodolite.util.YamlParserFromFile +import rocks.theodolite.kubernetes.k8s.CustomResourceWrapper +import rocks.theodolite.kubernetes.util.YamlParserFromFile /** * Used to load different Kubernetes resources. @@ -15,7 +15,7 @@ import theodolite.util.YamlParserFromFile * @param client KubernetesClient used to deploy or remove. */ class K8sResourceLoaderFromFile(private val client: NamespacedKubernetesClient): AbstractK8sLoader(), - K8sResourceLoader { + K8sResourceLoader { /** * Parses a Service from a service yaml diff --git a/theodolite/src/main/kotlin/theodolite/k8s/resourceLoader/K8sResourceLoaderFromString.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/resourceLoader/K8sResourceLoaderFromString.kt similarity index 91% rename from theodolite/src/main/kotlin/theodolite/k8s/resourceLoader/K8sResourceLoaderFromString.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/resourceLoader/K8sResourceLoaderFromString.kt index 639e4c458..4a1d8183b 100644 --- a/theodolite/src/main/kotlin/theodolite/k8s/resourceLoader/K8sResourceLoaderFromString.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/k8s/resourceLoader/K8sResourceLoaderFromString.kt @@ -1,4 +1,4 @@ -package theodolite.k8s.resourceLoader +package rocks.theodolite.kubernetes.k8s.resourceLoader import io.fabric8.kubernetes.api.model.ConfigMap import io.fabric8.kubernetes.api.model.KubernetesResource @@ -7,13 +7,13 @@ import io.fabric8.kubernetes.api.model.apps.Deployment import io.fabric8.kubernetes.api.model.apps.StatefulSet import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext -import theodolite.k8s.CustomResourceWrapper -import theodolite.util.YamlParserFromString +import rocks.theodolite.kubernetes.k8s.CustomResourceWrapper +import rocks.theodolite.kubernetes.util.YamlParserFromString import java.io.ByteArrayInputStream import java.io.InputStream class K8sResourceLoaderFromString(private val client: NamespacedKubernetesClient): AbstractK8sLoader(), - K8sResourceLoader { + K8sResourceLoader { override fun loadService(resource: String): Service { return loadAnyResource(resource) { stream -> client.services().load(stream).get() } diff --git a/theodolite/src/main/kotlin/theodolite/k8s/TopicManager.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/kafka/TopicManager.kt similarity index 98% rename from theodolite/src/main/kotlin/theodolite/k8s/TopicManager.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/kafka/TopicManager.kt index ed1e06571..e9a0cb4b3 100644 --- a/theodolite/src/main/kotlin/theodolite/k8s/TopicManager.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/kafka/TopicManager.kt @@ -1,4 +1,4 @@ -package theodolite.k8s +package rocks.theodolite.kubernetes.kafka import mu.KotlinLogging import org.apache.kafka.clients.admin.AdminClient diff --git a/theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkCRD.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/BenchmarkCRD.kt similarity index 85% rename from theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkCRD.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/BenchmarkCRD.kt index 0ec6decbd..1af6c7150 100644 --- a/theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkCRD.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/BenchmarkCRD.kt @@ -1,4 +1,4 @@ -package theodolite.model.crd +package rocks.theodolite.kubernetes.model.crd import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.fabric8.kubernetes.api.model.Namespaced @@ -6,7 +6,7 @@ import io.fabric8.kubernetes.client.CustomResource import io.fabric8.kubernetes.model.annotation.Group import io.fabric8.kubernetes.model.annotation.Kind import io.fabric8.kubernetes.model.annotation.Version -import theodolite.benchmark.KubernetesBenchmark +import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmark @JsonDeserialize @Version("v1") diff --git a/theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkExecutionList.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/BenchmarkExecutionList.kt similarity index 72% rename from theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkExecutionList.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/BenchmarkExecutionList.kt index 2b2dcc07f..768cd7c4f 100644 --- a/theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkExecutionList.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/BenchmarkExecutionList.kt @@ -1,4 +1,4 @@ -package theodolite.model.crd +package rocks.theodolite.kubernetes.model.crd import io.fabric8.kubernetes.client.CustomResourceList diff --git a/theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkState.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/BenchmarkState.kt similarity index 77% rename from theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkState.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/BenchmarkState.kt index dc2c6f9ba..928a41172 100644 --- a/theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkState.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/BenchmarkState.kt @@ -1,4 +1,4 @@ -package theodolite.model.crd +package rocks.theodolite.kubernetes.model.crd import com.fasterxml.jackson.annotation.JsonValue diff --git a/theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkStatus.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/BenchmarkStatus.kt similarity index 87% rename from theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkStatus.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/BenchmarkStatus.kt index d4a17dbef..691e5e1a8 100644 --- a/theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkStatus.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/BenchmarkStatus.kt @@ -1,4 +1,4 @@ -package theodolite.model.crd +package rocks.theodolite.kubernetes.model.crd import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.fabric8.kubernetes.api.model.KubernetesResource diff --git a/theodolite/src/main/kotlin/theodolite/model/crd/ExecutionCRD.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionCRD.kt similarity index 85% rename from theodolite/src/main/kotlin/theodolite/model/crd/ExecutionCRD.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionCRD.kt index 3be0aaf2a..4bb2d774e 100644 --- a/theodolite/src/main/kotlin/theodolite/model/crd/ExecutionCRD.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionCRD.kt @@ -1,4 +1,4 @@ -package theodolite.model.crd +package rocks.theodolite.kubernetes.model.crd import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.fabric8.kubernetes.api.model.Namespaced @@ -6,7 +6,7 @@ import io.fabric8.kubernetes.client.CustomResource import io.fabric8.kubernetes.model.annotation.Group import io.fabric8.kubernetes.model.annotation.Kind import io.fabric8.kubernetes.model.annotation.Version -import theodolite.benchmark.BenchmarkExecution +import rocks.theodolite.kubernetes.benchmark.BenchmarkExecution @JsonDeserialize @Version("v1") diff --git a/theodolite/src/main/kotlin/theodolite/model/crd/ExecutionState.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionState.kt similarity index 86% rename from theodolite/src/main/kotlin/theodolite/model/crd/ExecutionState.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionState.kt index 9ce38d9f5..d74d70eb8 100644 --- a/theodolite/src/main/kotlin/theodolite/model/crd/ExecutionState.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionState.kt @@ -1,4 +1,4 @@ -package theodolite.model.crd +package rocks.theodolite.kubernetes.model.crd import com.fasterxml.jackson.annotation.JsonValue diff --git a/theodolite/src/main/kotlin/theodolite/model/crd/ExecutionStatus.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionStatus.kt similarity index 97% rename from theodolite/src/main/kotlin/theodolite/model/crd/ExecutionStatus.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionStatus.kt index 1f843ccf9..6bec7197d 100644 --- a/theodolite/src/main/kotlin/theodolite/model/crd/ExecutionStatus.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionStatus.kt @@ -1,4 +1,4 @@ -package theodolite.model.crd +package rocks.theodolite.kubernetes.model.crd import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.core.JsonGenerator diff --git a/theodolite/src/main/kotlin/theodolite/util/KafkaConfig.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/KafkaConfig.kt similarity index 92% rename from theodolite/src/main/kotlin/theodolite/util/KafkaConfig.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/KafkaConfig.kt index 4e72ccb0d..adde94c51 100644 --- a/theodolite/src/main/kotlin/theodolite/util/KafkaConfig.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/KafkaConfig.kt @@ -1,8 +1,8 @@ -package theodolite.util +package rocks.theodolite.kubernetes.model.crd import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.quarkus.runtime.annotations.RegisterForReflection -import theodolite.util.KafkaConfig.TopicWrapper +import rocks.theodolite.kubernetes.model.crd.KafkaConfig.TopicWrapper import kotlin.properties.Delegates import kotlin.reflect.KProperty diff --git a/theodolite/src/main/kotlin/theodolite/model/crd/KubernetesBenchmarkList.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/KubernetesBenchmarkList.kt similarity index 72% rename from theodolite/src/main/kotlin/theodolite/model/crd/KubernetesBenchmarkList.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/KubernetesBenchmarkList.kt index 8ad0a493d..be34662bd 100644 --- a/theodolite/src/main/kotlin/theodolite/model/crd/KubernetesBenchmarkList.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/model/crd/KubernetesBenchmarkList.kt @@ -1,4 +1,4 @@ -package theodolite.model.crd +package rocks.theodolite.kubernetes.model.crd import io.fabric8.kubernetes.client.CustomResourceList diff --git a/theodolite/src/main/kotlin/theodolite/patcher/AbstractPatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/AbstractPatcher.kt similarity index 94% rename from theodolite/src/main/kotlin/theodolite/patcher/AbstractPatcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/AbstractPatcher.kt index df80e9cbd..ad0af99cc 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/AbstractPatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/AbstractPatcher.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.KubernetesResource diff --git a/theodolite/src/main/kotlin/theodolite/patcher/ConfigOverrideModifier.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ConfigOverrideModifier.kt similarity index 85% rename from theodolite/src/main/kotlin/theodolite/patcher/ConfigOverrideModifier.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ConfigOverrideModifier.kt index 8f77b1b95..2fe2905ef 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/ConfigOverrideModifier.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ConfigOverrideModifier.kt @@ -1,8 +1,8 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher -import theodolite.benchmark.BenchmarkExecution -import theodolite.util.ConfigurationOverride -import theodolite.util.PatcherDefinition +import rocks.theodolite.kubernetes.benchmark.BenchmarkExecution +import rocks.theodolite.kubernetes.util.ConfigurationOverride +import rocks.theodolite.kubernetes.util.PatcherDefinition /** * The ConfigOverrideModifier makes it possible to update the configuration overrides of an execution. diff --git a/theodolite/src/main/kotlin/theodolite/patcher/DataVolumeLoadGeneratorReplicaPatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/DataVolumeLoadGeneratorReplicaPatcher.kt similarity index 97% rename from theodolite/src/main/kotlin/theodolite/patcher/DataVolumeLoadGeneratorReplicaPatcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/DataVolumeLoadGeneratorReplicaPatcher.kt index bdc107910..00c344201 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/DataVolumeLoadGeneratorReplicaPatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/DataVolumeLoadGeneratorReplicaPatcher.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.KubernetesResource diff --git a/theodolite/src/main/kotlin/theodolite/patcher/EnvVarPatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/EnvVarPatcher.kt similarity index 97% rename from theodolite/src/main/kotlin/theodolite/patcher/EnvVarPatcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/EnvVarPatcher.kt index 416aec74a..6739cfb17 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/EnvVarPatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/EnvVarPatcher.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.Container import io.fabric8.kubernetes.api.model.EnvVar diff --git a/theodolite/src/main/kotlin/theodolite/patcher/ImagePatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ImagePatcher.kt similarity index 95% rename from theodolite/src/main/kotlin/theodolite/patcher/ImagePatcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ImagePatcher.kt index 8f6753372..2a18d9a8e 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/ImagePatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ImagePatcher.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.api.model.apps.Deployment diff --git a/theodolite/src/main/kotlin/theodolite/patcher/LabelPatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/LabelPatcher.kt similarity index 97% rename from theodolite/src/main/kotlin/theodolite/patcher/LabelPatcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/LabelPatcher.kt index 2f8c703af..82f5f9123 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/LabelPatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/LabelPatcher.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.ConfigMap import io.fabric8.kubernetes.api.model.KubernetesResource diff --git a/theodolite/src/main/kotlin/theodolite/patcher/MatchLabelPatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/MatchLabelPatcher.kt similarity index 96% rename from theodolite/src/main/kotlin/theodolite/patcher/MatchLabelPatcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/MatchLabelPatcher.kt index 30ff73b5d..09b8c9606 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/MatchLabelPatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/MatchLabelPatcher.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.api.model.apps.Deployment diff --git a/theodolite/src/main/kotlin/theodolite/patcher/NodeSelectorPatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/NodeSelectorPatcher.kt similarity index 94% rename from theodolite/src/main/kotlin/theodolite/patcher/NodeSelectorPatcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/NodeSelectorPatcher.kt index 0e8cd553a..ce79207a8 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/NodeSelectorPatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/NodeSelectorPatcher.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.api.model.apps.Deployment diff --git a/theodolite/src/main/kotlin/theodolite/patcher/NumNestedGroupsLoadGeneratorReplicaPatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/NumNestedGroupsLoadGeneratorReplicaPatcher.kt similarity index 95% rename from theodolite/src/main/kotlin/theodolite/patcher/NumNestedGroupsLoadGeneratorReplicaPatcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/NumNestedGroupsLoadGeneratorReplicaPatcher.kt index c617917e6..c6b736544 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/NumNestedGroupsLoadGeneratorReplicaPatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/NumNestedGroupsLoadGeneratorReplicaPatcher.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.api.model.apps.Deployment diff --git a/theodolite/src/main/kotlin/theodolite/patcher/NumSensorsLoadGeneratorReplicaPatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/NumSensorsLoadGeneratorReplicaPatcher.kt similarity index 93% rename from theodolite/src/main/kotlin/theodolite/patcher/NumSensorsLoadGeneratorReplicaPatcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/NumSensorsLoadGeneratorReplicaPatcher.kt index 86bb37db3..8880a1213 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/NumSensorsLoadGeneratorReplicaPatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/NumSensorsLoadGeneratorReplicaPatcher.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.api.model.apps.Deployment diff --git a/theodolite/src/main/kotlin/theodolite/patcher/Patcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/Patcher.kt similarity index 90% rename from theodolite/src/main/kotlin/theodolite/patcher/Patcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/Patcher.kt index 84b886cb4..8efabc082 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/Patcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/Patcher.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.quarkus.runtime.annotations.RegisterForReflection diff --git a/theodolite/src/main/kotlin/theodolite/patcher/PatcherDefinitionFactory.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/PatcherDefinitionFactory.kt similarity index 86% rename from theodolite/src/main/kotlin/theodolite/patcher/PatcherDefinitionFactory.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/PatcherDefinitionFactory.kt index 6a1f993e2..3e87ecc55 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/PatcherDefinitionFactory.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/PatcherDefinitionFactory.kt @@ -1,7 +1,7 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher -import theodolite.util.PatcherDefinition -import theodolite.util.TypeName +import rocks.theodolite.kubernetes.util.PatcherDefinition +import rocks.theodolite.kubernetes.util.TypeName /** * The PatcherDefinition Factory creates a [PatcherDefinition]s. diff --git a/theodolite/src/main/kotlin/theodolite/patcher/PatcherFactory.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/PatcherFactory.kt similarity index 93% rename from theodolite/src/main/kotlin/theodolite/patcher/PatcherFactory.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/PatcherFactory.kt index e92de4dba..3bd03efa7 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/PatcherFactory.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/PatcherFactory.kt @@ -1,8 +1,8 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.KubernetesResource -import theodolite.util.InvalidPatcherConfigurationException -import theodolite.util.PatcherDefinition +import rocks.theodolite.kubernetes.util.exception.InvalidPatcherConfigurationException +import rocks.theodolite.kubernetes.util.PatcherDefinition /** * The Patcher factory creates [Patcher]s @@ -24,8 +24,8 @@ class PatcherFactory { * @throws IllegalArgumentException if no patcher can be created. */ fun createPatcher( - patcherDefinition: PatcherDefinition, - k8sResources: Collection<Pair<String, KubernetesResource>> + patcherDefinition: PatcherDefinition, + k8sResources: Collection<Pair<String, KubernetesResource>> ): Patcher { val resource = k8sResources.filter { it.first == patcherDefinition.resource } diff --git a/theodolite/src/main/kotlin/theodolite/patcher/ReplicaPatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ReplicaPatcher.kt similarity index 93% rename from theodolite/src/main/kotlin/theodolite/patcher/ReplicaPatcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ReplicaPatcher.kt index 4cc35f2ed..a9ea180c4 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/ReplicaPatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ReplicaPatcher.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.api.model.apps.Deployment diff --git a/theodolite/src/main/kotlin/theodolite/patcher/ResourceLimitPatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ResourceLimitPatcher.kt similarity index 94% rename from theodolite/src/main/kotlin/theodolite/patcher/ResourceLimitPatcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ResourceLimitPatcher.kt index 9dcdffa04..340236dfb 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/ResourceLimitPatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ResourceLimitPatcher.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.Container import io.fabric8.kubernetes.api.model.KubernetesResource @@ -6,7 +6,7 @@ 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 theodolite.util.InvalidPatcherConfigurationException +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/theodolite/patcher/ResourceRequestPatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ResourceRequestPatcher.kt similarity index 94% rename from theodolite/src/main/kotlin/theodolite/patcher/ResourceRequestPatcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ResourceRequestPatcher.kt index 24cdde40f..d461a0f86 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/ResourceRequestPatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/ResourceRequestPatcher.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.Container import io.fabric8.kubernetes.api.model.KubernetesResource @@ -6,7 +6,7 @@ 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 theodolite.util.InvalidPatcherConfigurationException +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/theodolite/patcher/SchedulerNamePatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/SchedulerNamePatcher.kt similarity index 92% rename from theodolite/src/main/kotlin/theodolite/patcher/SchedulerNamePatcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/SchedulerNamePatcher.kt index 348f0c500..a21a31c69 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/SchedulerNamePatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/SchedulerNamePatcher.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.api.model.apps.Deployment diff --git a/theodolite/src/main/kotlin/theodolite/patcher/TemplateLabelPatcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/TemplateLabelPatcher.kt similarity index 96% rename from theodolite/src/main/kotlin/theodolite/patcher/TemplateLabelPatcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/TemplateLabelPatcher.kt index a524e5c40..736cb6cb4 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/TemplateLabelPatcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/patcher/TemplateLabelPatcher.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.api.model.apps.Deployment diff --git a/theodolite/src/main/kotlin/theodolite/evaluation/AnalysisExecutor.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/AnalysisExecutor.kt similarity index 91% rename from theodolite/src/main/kotlin/theodolite/evaluation/AnalysisExecutor.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/AnalysisExecutor.kt index 39e686b3b..c1000f1d4 100644 --- a/theodolite/src/main/kotlin/theodolite/evaluation/AnalysisExecutor.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/AnalysisExecutor.kt @@ -1,9 +1,9 @@ -package theodolite.evaluation +package rocks.theodolite.kubernetes.slo.evaluation -import theodolite.benchmark.Slo -import theodolite.strategies.Metric -import theodolite.util.EvaluationFailedException -import theodolite.util.IOHandler +import rocks.theodolite.core.strategies.Metric +import rocks.theodolite.core.util.IOHandler +import rocks.theodolite.kubernetes.benchmark.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/theodolite/evaluation/ExternalSloChecker.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/ExternalSloChecker.kt similarity index 94% rename from theodolite/src/main/kotlin/theodolite/evaluation/ExternalSloChecker.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/ExternalSloChecker.kt index 7fb5417e2..a1afa2d1c 100644 --- a/theodolite/src/main/kotlin/theodolite/evaluation/ExternalSloChecker.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/ExternalSloChecker.kt @@ -1,8 +1,8 @@ -package theodolite.evaluation +package rocks.theodolite.kubernetes.slo.evaluation import khttp.post import mu.KotlinLogging -import theodolite.util.PrometheusResponse +import rocks.theodolite.kubernetes.util.PrometheusResponse import java.net.ConnectException /** diff --git a/theodolite/src/main/kotlin/theodolite/evaluation/MetricFetcher.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/MetricFetcher.kt similarity index 95% rename from theodolite/src/main/kotlin/theodolite/evaluation/MetricFetcher.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/MetricFetcher.kt index e54d79fe0..6eb06fcaf 100644 --- a/theodolite/src/main/kotlin/theodolite/evaluation/MetricFetcher.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/MetricFetcher.kt @@ -1,10 +1,10 @@ -package theodolite.evaluation +package rocks.theodolite.kubernetes.slo.evaluation import com.google.gson.Gson import khttp.get import khttp.responses.Response import mu.KotlinLogging -import theodolite.util.PrometheusResponse +import rocks.theodolite.kubernetes.util.PrometheusResponse import java.net.ConnectException import java.time.Duration import java.time.Instant diff --git a/theodolite/src/main/kotlin/theodolite/evaluation/SloChecker.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/SloChecker.kt similarity index 80% rename from theodolite/src/main/kotlin/theodolite/evaluation/SloChecker.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/SloChecker.kt index 82f903f5b..8f32a09ed 100644 --- a/theodolite/src/main/kotlin/theodolite/evaluation/SloChecker.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/SloChecker.kt @@ -1,6 +1,6 @@ -package theodolite.evaluation +package rocks.theodolite.kubernetes.slo.evaluation -import theodolite.util.PrometheusResponse +import rocks.theodolite.kubernetes.util.PrometheusResponse /** * A SloChecker can be used to evaluate data from Prometheus. diff --git a/theodolite/src/main/kotlin/theodolite/evaluation/SloCheckerFactory.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/SloCheckerFactory.kt similarity index 97% rename from theodolite/src/main/kotlin/theodolite/evaluation/SloCheckerFactory.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/SloCheckerFactory.kt index 7ab6a0255..fd2b38de2 100644 --- a/theodolite/src/main/kotlin/theodolite/evaluation/SloCheckerFactory.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/SloCheckerFactory.kt @@ -1,6 +1,6 @@ -package theodolite.evaluation +package rocks.theodolite.kubernetes.slo.evaluation -import theodolite.strategies.Metric +import rocks.theodolite.core.strategies.Metric /** diff --git a/theodolite/src/main/kotlin/theodolite/evaluation/SloConfigHandler.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/SloConfigHandler.kt similarity index 83% rename from theodolite/src/main/kotlin/theodolite/evaluation/SloConfigHandler.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/SloConfigHandler.kt index 77968d6ce..94f9af404 100644 --- a/theodolite/src/main/kotlin/theodolite/evaluation/SloConfigHandler.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/SloConfigHandler.kt @@ -1,7 +1,7 @@ -package theodolite.evaluation +package rocks.theodolite.kubernetes.slo.evaluation -import theodolite.benchmark.Slo -import theodolite.util.InvalidPatcherConfigurationException +import rocks.theodolite.kubernetes.benchmark.Slo +import rocks.theodolite.kubernetes.util.exception.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/theodolite/evaluation/SloJson.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/SloJson.kt similarity index 76% rename from theodolite/src/main/kotlin/theodolite/evaluation/SloJson.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/SloJson.kt index 205389276..8e1609eec 100644 --- a/theodolite/src/main/kotlin/theodolite/evaluation/SloJson.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/SloJson.kt @@ -1,7 +1,7 @@ -package theodolite.evaluation +package rocks.theodolite.kubernetes.slo.evaluation import com.google.gson.Gson -import theodolite.util.PromResult +import rocks.theodolite.kubernetes.util.PromResult class SloJson constructor( val results: List<List<PromResult>>, diff --git a/theodolite/src/main/kotlin/theodolite/evaluation/SloTypes.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/SloTypes.kt similarity index 89% rename from theodolite/src/main/kotlin/theodolite/evaluation/SloTypes.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/SloTypes.kt index 812b50de7..af5d88804 100644 --- a/theodolite/src/main/kotlin/theodolite/evaluation/SloTypes.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/slo/evaluation/SloTypes.kt @@ -1,4 +1,4 @@ -package theodolite.evaluation +package rocks.theodolite.kubernetes.slo.evaluation enum class SloTypes(val value: String) { GENERIC("generic"), diff --git a/theodolite/src/main/kotlin/theodolite/execution/TheodoliteStandalone.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/standalone/TheodoliteStandalone.kt similarity index 80% rename from theodolite/src/main/kotlin/theodolite/execution/TheodoliteStandalone.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/standalone/TheodoliteStandalone.kt index 1bbf3e01f..654f5452a 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/TheodoliteStandalone.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/standalone/TheodoliteStandalone.kt @@ -1,14 +1,17 @@ -package theodolite.execution +package rocks.theodolite.kubernetes.standalone import mu.KotlinLogging -import theodolite.benchmark.BenchmarkExecution -import theodolite.benchmark.KubernetesBenchmark -import theodolite.util.YamlParserFromFile -import theodolite.util.EvaluationFailedException -import theodolite.util.ExecutionFailedException +import rocks.theodolite.kubernetes.benchmark.BenchmarkExecution +import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmark +import rocks.theodolite.kubernetes.execution.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.execution.Shutdown import kotlin.concurrent.thread import kotlin.system.exitProcess + private val logger = KotlinLogging.logger {} diff --git a/theodolite/src/main/kotlin/theodolite/util/Configuration.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/Configuration.kt similarity index 85% rename from theodolite/src/main/kotlin/theodolite/util/Configuration.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/Configuration.kt index 0a63cfa84..f172b07df 100644 --- a/theodolite/src/main/kotlin/theodolite/util/Configuration.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/Configuration.kt @@ -1,6 +1,6 @@ -package theodolite.util +package rocks.theodolite.kubernetes.util -import theodolite.execution.ExecutionModes +import rocks.theodolite.kubernetes.execution.ExecutionModes // Defaults private const val DEFAULT_NAMESPACE = "default" diff --git a/theodolite/src/main/kotlin/theodolite/util/ConfigurationOverride.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/ConfigurationOverride.kt similarity index 91% rename from theodolite/src/main/kotlin/theodolite/util/ConfigurationOverride.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/ConfigurationOverride.kt index 537b44721..87cdcfb6e 100644 --- a/theodolite/src/main/kotlin/theodolite/util/ConfigurationOverride.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/ConfigurationOverride.kt @@ -1,4 +1,4 @@ -package theodolite.util +package rocks.theodolite.kubernetes.util import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.quarkus.runtime.annotations.RegisterForReflection diff --git a/theodolite/src/main/kotlin/theodolite/util/ExecutionStateComparator.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/ExecutionStateComparator.kt similarity index 75% rename from theodolite/src/main/kotlin/theodolite/util/ExecutionStateComparator.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/ExecutionStateComparator.kt index 81bf350b5..1568276fc 100644 --- a/theodolite/src/main/kotlin/theodolite/util/ExecutionStateComparator.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/ExecutionStateComparator.kt @@ -1,7 +1,7 @@ -package theodolite.util +package rocks.theodolite.kubernetes.util -import theodolite.model.crd.ExecutionCRD -import theodolite.model.crd.ExecutionState +import rocks.theodolite.kubernetes.model.crd.ExecutionCRD +import rocks.theodolite.kubernetes.model.crd.ExecutionState class ExecutionStateComparator(private val preferredState: ExecutionState): Comparator<ExecutionCRD> { diff --git a/theodolite/src/main/kotlin/theodolite/util/Parser.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/Parser.kt similarity index 89% rename from theodolite/src/main/kotlin/theodolite/util/Parser.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/Parser.kt index e435b1cbb..65cd6a393 100644 --- a/theodolite/src/main/kotlin/theodolite/util/Parser.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/Parser.kt @@ -1,4 +1,4 @@ -package theodolite.util +package rocks.theodolite.kubernetes.util /** * Interface for parsers. diff --git a/theodolite/src/main/kotlin/theodolite/util/PatcherDefinition.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/PatcherDefinition.kt similarity index 94% rename from theodolite/src/main/kotlin/theodolite/util/PatcherDefinition.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/PatcherDefinition.kt index 6ec0cce36..5f3093d47 100644 --- a/theodolite/src/main/kotlin/theodolite/util/PatcherDefinition.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/PatcherDefinition.kt @@ -1,4 +1,4 @@ -package theodolite.util +package rocks.theodolite.kubernetes.util import com.fasterxml.jackson.databind.annotation.JsonDeserialize import com.fasterxml.jackson.databind.annotation.JsonSerialize diff --git a/theodolite/src/main/kotlin/theodolite/util/PrometheusResponse.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/PrometheusResponse.kt similarity index 98% rename from theodolite/src/main/kotlin/theodolite/util/PrometheusResponse.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/PrometheusResponse.kt index 9b0b0dd4e..5222a78bd 100644 --- a/theodolite/src/main/kotlin/theodolite/util/PrometheusResponse.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/PrometheusResponse.kt @@ -1,4 +1,4 @@ -package theodolite.util +package rocks.theodolite.kubernetes.util import io.quarkus.runtime.annotations.RegisterForReflection import java.util.* diff --git a/theodolite/src/main/kotlin/theodolite/util/TypeName.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/TypeName.kt similarity index 91% rename from theodolite/src/main/kotlin/theodolite/util/TypeName.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/TypeName.kt index f20fc7c9c..87b3cba21 100644 --- a/theodolite/src/main/kotlin/theodolite/util/TypeName.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/TypeName.kt @@ -1,4 +1,4 @@ -package theodolite.util +package rocks.theodolite.kubernetes.util import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.quarkus.runtime.annotations.RegisterForReflection diff --git a/theodolite/src/main/kotlin/theodolite/util/YamlParserFromFile.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/YamlParserFromFile.kt similarity index 91% rename from theodolite/src/main/kotlin/theodolite/util/YamlParserFromFile.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/YamlParserFromFile.kt index ae36349e6..c91769d57 100644 --- a/theodolite/src/main/kotlin/theodolite/util/YamlParserFromFile.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/YamlParserFromFile.kt @@ -1,4 +1,4 @@ -package theodolite.util +package rocks.theodolite.kubernetes.util import org.yaml.snakeyaml.Yaml import org.yaml.snakeyaml.constructor.Constructor diff --git a/theodolite/src/main/kotlin/theodolite/util/YamlParserFromString.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/YamlParserFromString.kt similarity index 88% rename from theodolite/src/main/kotlin/theodolite/util/YamlParserFromString.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/YamlParserFromString.kt index 0e197908a..cd23594b9 100644 --- a/theodolite/src/main/kotlin/theodolite/util/YamlParserFromString.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/YamlParserFromString.kt @@ -1,4 +1,4 @@ -package theodolite.util +package rocks.theodolite.kubernetes.util import org.yaml.snakeyaml.Yaml import org.yaml.snakeyaml.constructor.Constructor diff --git a/theodolite/src/main/kotlin/theodolite/util/ActionCommandFailedException.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/ActionCommandFailedException.kt similarity index 69% rename from theodolite/src/main/kotlin/theodolite/util/ActionCommandFailedException.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/ActionCommandFailedException.kt index c1a8fc401..a22928378 100644 --- a/theodolite/src/main/kotlin/theodolite/util/ActionCommandFailedException.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/ActionCommandFailedException.kt @@ -1,4 +1,4 @@ -package theodolite.util +package rocks.theodolite.kubernetes.util.exception class ActionCommandFailedException(message: String, e: Exception? = null) : DeploymentFailedException(message,e) { } \ No newline at end of file diff --git a/theodolite/src/main/kotlin/theodolite/util/DeploymentFailedException.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/DeploymentFailedException.kt similarity index 68% rename from theodolite/src/main/kotlin/theodolite/util/DeploymentFailedException.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/DeploymentFailedException.kt index 9f4caedf3..be577bd9d 100644 --- a/theodolite/src/main/kotlin/theodolite/util/DeploymentFailedException.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/DeploymentFailedException.kt @@ -1,4 +1,4 @@ -package theodolite.util +package rocks.theodolite.kubernetes.util.exception open class DeploymentFailedException(message: String, e: Exception? = null) : TheodoliteException(message,e) diff --git a/theodolite/src/main/kotlin/theodolite/util/EvaluationFailedException.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/EvaluationFailedException.kt similarity index 68% rename from theodolite/src/main/kotlin/theodolite/util/EvaluationFailedException.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/EvaluationFailedException.kt index ebdf5a37b..05a552cb8 100644 --- a/theodolite/src/main/kotlin/theodolite/util/EvaluationFailedException.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/EvaluationFailedException.kt @@ -1,3 +1,3 @@ -package theodolite.util +package rocks.theodolite.kubernetes.util.exception class EvaluationFailedException(message: String, e: Exception? = null) : ExecutionFailedException(message,e) diff --git a/theodolite/src/main/kotlin/theodolite/util/ExecutionFailedException.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/ExecutionFailedException.kt similarity index 68% rename from theodolite/src/main/kotlin/theodolite/util/ExecutionFailedException.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/ExecutionFailedException.kt index 2e181dad3..efbd8fd0c 100644 --- a/theodolite/src/main/kotlin/theodolite/util/ExecutionFailedException.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/ExecutionFailedException.kt @@ -1,3 +1,3 @@ -package theodolite.util +package rocks.theodolite.kubernetes.util.exception open class ExecutionFailedException(message: String, e: Exception? = null) : TheodoliteException(message,e) diff --git a/theodolite/src/main/kotlin/theodolite/util/InvalidPatcherConfigurationException.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/InvalidPatcherConfigurationException.kt similarity index 70% rename from theodolite/src/main/kotlin/theodolite/util/InvalidPatcherConfigurationException.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/InvalidPatcherConfigurationException.kt index d02948ad3..895d83dce 100644 --- a/theodolite/src/main/kotlin/theodolite/util/InvalidPatcherConfigurationException.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/InvalidPatcherConfigurationException.kt @@ -1,3 +1,3 @@ -package theodolite.util +package rocks.theodolite.kubernetes.util.exception class InvalidPatcherConfigurationException(message: String, e: Exception? = null) : DeploymentFailedException(message,e) diff --git a/theodolite/src/main/kotlin/theodolite/util/TheodoliteException.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/TheodoliteException.kt similarity index 64% rename from theodolite/src/main/kotlin/theodolite/util/TheodoliteException.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/TheodoliteException.kt index fc7453bae..bb9b4e29c 100644 --- a/theodolite/src/main/kotlin/theodolite/util/TheodoliteException.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/util/exception/TheodoliteException.kt @@ -1,3 +1,3 @@ -package theodolite.util +package rocks.theodolite.kubernetes.util.exception open class TheodoliteException (message: String, e: Exception? = null) : Exception(message,e) \ No newline at end of file diff --git a/theodolite/src/test/kotlin/theodolite/InitialGuessSearchStrategyTest.kt b/theodolite/src/test/kotlin/theodolite/InitialGuessSearchStrategyTest.kt index 07a793108..8dc721da7 100644 --- a/theodolite/src/test/kotlin/theodolite/InitialGuessSearchStrategyTest.kt +++ b/theodolite/src/test/kotlin/theodolite/InitialGuessSearchStrategyTest.kt @@ -3,12 +3,12 @@ package theodolite import io.quarkus.test.junit.QuarkusTest import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test -import theodolite.strategies.searchstrategy.InitialGuessSearchStrategy -import theodolite.strategies.Metric -import theodolite.util.Results +import rocks.theodolite.core.strategies.Metric import mu.KotlinLogging -import theodolite.benchmark.Slo -import theodolite.strategies.searchstrategy.PrevInstanceOptGuess +import rocks.theodolite.core.strategies.guessstrategy.PrevInstanceOptGuess +import rocks.theodolite.core.strategies.searchstrategy.InitialGuessSearchStrategy +import rocks.theodolite.core.util.Results +import rocks.theodolite.kubernetes.benchmark.Slo private val logger = KotlinLogging.logger {} diff --git a/theodolite/src/test/kotlin/theodolite/ResourceLimitPatcherTest.kt b/theodolite/src/test/kotlin/theodolite/ResourceLimitPatcherTest.kt index b7fc2d9f1..c60d4d80c 100644 --- a/theodolite/src/test/kotlin/theodolite/ResourceLimitPatcherTest.kt +++ b/theodolite/src/test/kotlin/theodolite/ResourceLimitPatcherTest.kt @@ -5,9 +5,9 @@ import io.fabric8.kubernetes.client.DefaultKubernetesClient import io.quarkus.test.junit.QuarkusTest import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test -import theodolite.k8s.resourceLoader.K8sResourceLoaderFromFile -import theodolite.patcher.PatcherFactory -import theodolite.util.PatcherDefinition +import rocks.theodolite.kubernetes.k8s.resourceLoader.K8sResourceLoaderFromFile +import rocks.theodolite.kubernetes.patcher.PatcherFactory +import rocks.theodolite.kubernetes.util.PatcherDefinition /** * Resource patcher test diff --git a/theodolite/src/test/kotlin/theodolite/ResourceRequestPatcherTest.kt b/theodolite/src/test/kotlin/theodolite/ResourceRequestPatcherTest.kt index 8794d4dc2..ff419e42d 100644 --- a/theodolite/src/test/kotlin/theodolite/ResourceRequestPatcherTest.kt +++ b/theodolite/src/test/kotlin/theodolite/ResourceRequestPatcherTest.kt @@ -5,9 +5,9 @@ import io.fabric8.kubernetes.client.DefaultKubernetesClient import io.quarkus.test.junit.QuarkusTest import io.smallrye.common.constraint.Assert.assertTrue import org.junit.jupiter.api.Test -import theodolite.k8s.resourceLoader.K8sResourceLoaderFromFile -import theodolite.patcher.PatcherFactory -import theodolite.util.PatcherDefinition +import rocks.theodolite.kubernetes.k8s.resourceLoader.K8sResourceLoaderFromFile +import rocks.theodolite.kubernetes.patcher.PatcherFactory +import rocks.theodolite.kubernetes.util.PatcherDefinition /** * Resource patcher test diff --git a/theodolite/src/test/kotlin/theodolite/RestrictionSearchTest.kt b/theodolite/src/test/kotlin/theodolite/RestrictionSearchTest.kt index 41d019ef2..f5cc4c991 100644 --- a/theodolite/src/test/kotlin/theodolite/RestrictionSearchTest.kt +++ b/theodolite/src/test/kotlin/theodolite/RestrictionSearchTest.kt @@ -3,14 +3,15 @@ package theodolite import io.quarkus.test.junit.QuarkusTest import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test -import theodolite.benchmark.Slo -import theodolite.strategies.Metric -import theodolite.strategies.restriction.LowerBoundRestriction -import theodolite.strategies.searchstrategy.BinarySearch -import theodolite.strategies.searchstrategy.FullSearch -import theodolite.strategies.searchstrategy.RestrictionSearch -import theodolite.strategies.searchstrategy.LinearSearch -import theodolite.util.Results + +import rocks.theodolite.core.strategies.Metric +import rocks.theodolite.core.strategies.restrictionstrategy.LowerBoundRestriction +import rocks.theodolite.core.strategies.searchstrategy.BinarySearch +import rocks.theodolite.core.strategies.searchstrategy.FullSearch +import rocks.theodolite.core.strategies.searchstrategy.LinearSearch +import rocks.theodolite.core.strategies.searchstrategy.RestrictionSearch +import rocks.theodolite.core.util.Results +import rocks.theodolite.kubernetes.benchmark.Slo @QuarkusTest class RestrictionSearchTest { diff --git a/theodolite/src/test/kotlin/theodolite/TestBenchmark.kt b/theodolite/src/test/kotlin/theodolite/TestBenchmark.kt index 335b0f8c5..46ba89170 100644 --- a/theodolite/src/test/kotlin/theodolite/TestBenchmark.kt +++ b/theodolite/src/test/kotlin/theodolite/TestBenchmark.kt @@ -1,9 +1,9 @@ package theodolite -import theodolite.benchmark.Benchmark -import theodolite.benchmark.BenchmarkDeployment -import theodolite.util.ConfigurationOverride -import theodolite.util.PatcherDefinition +import rocks.theodolite.kubernetes.benchmark.Benchmark +import rocks.theodolite.kubernetes.benchmark.BenchmarkDeployment +import rocks.theodolite.kubernetes.util.ConfigurationOverride +import rocks.theodolite.kubernetes.util.PatcherDefinition class TestBenchmark : Benchmark { diff --git a/theodolite/src/test/kotlin/theodolite/TestBenchmarkDeployment.kt b/theodolite/src/test/kotlin/theodolite/TestBenchmarkDeployment.kt index 68b08c294..098598ce1 100644 --- a/theodolite/src/test/kotlin/theodolite/TestBenchmarkDeployment.kt +++ b/theodolite/src/test/kotlin/theodolite/TestBenchmarkDeployment.kt @@ -1,6 +1,6 @@ package theodolite -import theodolite.benchmark.BenchmarkDeployment +import rocks.theodolite.kubernetes.benchmark.BenchmarkDeployment class TestBenchmarkDeployment : BenchmarkDeployment { override fun setup() {} diff --git a/theodolite/src/test/kotlin/theodolite/TestBenchmarkExecutorImpl.kt b/theodolite/src/test/kotlin/theodolite/TestBenchmarkExecutorImpl.kt index 97197f3ba..a917b5b36 100644 --- a/theodolite/src/test/kotlin/theodolite/TestBenchmarkExecutorImpl.kt +++ b/theodolite/src/test/kotlin/theodolite/TestBenchmarkExecutorImpl.kt @@ -1,9 +1,9 @@ package theodolite -import theodolite.benchmark.Benchmark -import theodolite.benchmark.Slo -import theodolite.execution.BenchmarkExecutor -import theodolite.util.Results +import rocks.theodolite.core.util.Results +import rocks.theodolite.kubernetes.benchmark.Benchmark +import rocks.theodolite.kubernetes.benchmark.Slo +import rocks.theodolite.kubernetes.execution.BenchmarkExecutor import java.time.Duration class TestBenchmarkExecutorImpl( diff --git a/theodolite/src/test/kotlin/theodolite/benchmark/ActionCommandTest.kt b/theodolite/src/test/kotlin/theodolite/benchmark/ActionCommandTest.kt index 0e40fca5c..61eaa3552 100644 --- a/theodolite/src/test/kotlin/theodolite/benchmark/ActionCommandTest.kt +++ b/theodolite/src/test/kotlin/theodolite/benchmark/ActionCommandTest.kt @@ -8,9 +8,11 @@ import io.fabric8.kubernetes.client.utils.Utils import io.quarkus.test.junit.QuarkusTest import org.junit.jupiter.api.* import org.junit.jupiter.api.Assertions.assertEquals -import theodolite.execution.operator.TheodoliteController -import theodolite.execution.operator.TheodoliteOperator -import theodolite.util.ActionCommandFailedException +import rocks.theodolite.kubernetes.benchmark.* +import rocks.theodolite.kubernetes.execution.operator.TheodoliteController +import rocks.theodolite.kubernetes.execution.operator.TheodoliteOperator +import rocks.theodolite.kubernetes.util.exception.ActionCommandFailedException + @QuarkusTest class ActionCommandTest { diff --git a/theodolite/src/test/kotlin/theodolite/benchmark/ConfigMapResourceSetTest.kt b/theodolite/src/test/kotlin/theodolite/benchmark/ConfigMapResourceSetTest.kt index bc3263aa5..42b07d154 100644 --- a/theodolite/src/test/kotlin/theodolite/benchmark/ConfigMapResourceSetTest.kt +++ b/theodolite/src/test/kotlin/theodolite/benchmark/ConfigMapResourceSetTest.kt @@ -14,9 +14,10 @@ import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertThrows -import theodolite.k8s.CustomResourceWrapper -import theodolite.k8s.resourceLoader.K8sResourceLoaderFromFile -import theodolite.util.DeploymentFailedException +import rocks.theodolite.kubernetes.benchmark.ConfigMapResourceSet +import rocks.theodolite.kubernetes.k8s.CustomResourceWrapper +import rocks.theodolite.kubernetes.k8s.resourceLoader.K8sResourceLoaderFromFile +import rocks.theodolite.kubernetes.util.exception.DeploymentFailedException private const val testResourcePath = "./src/test/resources/k8s-resource-files/" diff --git a/theodolite/src/test/kotlin/theodolite/benchmark/FileSystemResourceSetTest.kt b/theodolite/src/test/kotlin/theodolite/benchmark/FileSystemResourceSetTest.kt index f15685c8e..f4593d6cf 100644 --- a/theodolite/src/test/kotlin/theodolite/benchmark/FileSystemResourceSetTest.kt +++ b/theodolite/src/test/kotlin/theodolite/benchmark/FileSystemResourceSetTest.kt @@ -11,8 +11,9 @@ import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertThrows -import theodolite.k8s.CustomResourceWrapper -import theodolite.util.DeploymentFailedException +import rocks.theodolite.kubernetes.benchmark.FileSystemResourceSet +import rocks.theodolite.kubernetes.k8s.CustomResourceWrapper +import rocks.theodolite.kubernetes.util.exception.DeploymentFailedException private const val testResourcePath = "./src/test/resources/k8s-resource-files/" diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt b/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt index bf73ea9db..cd57d4f01 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt +++ b/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt @@ -1,9 +1,9 @@ package theodolite.execution.operator -import theodolite.benchmark.KubernetesBenchmark -import theodolite.benchmark.Resources -import theodolite.model.crd.BenchmarkCRD -import theodolite.util.KafkaConfig +import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmark +import rocks.theodolite.kubernetes.benchmark.Resources +import rocks.theodolite.kubernetes.model.crd.BenchmarkCRD +import rocks.theodolite.kubernetes.model.crd.KafkaConfig class BenchmarkCRDummy(name: String) { diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkStateCheckerTest.kt b/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkStateCheckerTest.kt index 528cfac80..c15a1650e 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkStateCheckerTest.kt +++ b/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkStateCheckerTest.kt @@ -13,8 +13,10 @@ 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 theodolite.benchmark.* -import theodolite.model.crd.BenchmarkState +import rocks.theodolite.kubernetes.benchmark.* +import rocks.theodolite.kubernetes.execution.operator.BenchmarkStateChecker +import rocks.theodolite.kubernetes.execution.operator.TheodoliteOperator +import rocks.theodolite.kubernetes.model.crd.BenchmarkState internal class BenchmarkStateCheckerTest { private val server = KubernetesServer(false, false) diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/ControllerTest.kt b/theodolite/src/test/kotlin/theodolite/execution/operator/ControllerTest.kt index 7d40f7e45..a61b194de 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/ControllerTest.kt +++ b/theodolite/src/test/kotlin/theodolite/execution/operator/ControllerTest.kt @@ -10,11 +10,14 @@ import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test -import theodolite.benchmark.BenchmarkExecution -import theodolite.benchmark.KubernetesBenchmark -import theodolite.model.crd.BenchmarkCRD -import theodolite.model.crd.BenchmarkState -import theodolite.model.crd.ExecutionCRD +import rocks.theodolite.kubernetes.benchmark.BenchmarkExecution +import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmark +import rocks.theodolite.kubernetes.execution.operator.TheodoliteController +import rocks.theodolite.kubernetes.execution.operator.TheodoliteOperator +import rocks.theodolite.kubernetes.model.crd.BenchmarkCRD +import rocks.theodolite.kubernetes.model.crd.BenchmarkState +import rocks.theodolite.kubernetes.model.crd.ExecutionCRD + @QuarkusTest class ControllerTest { diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionCRDummy.kt b/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionCRDummy.kt index 961c813f4..f82b8a31a 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionCRDummy.kt +++ b/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionCRDummy.kt @@ -1,9 +1,9 @@ package theodolite.execution.operator -import theodolite.benchmark.BenchmarkExecution -import theodolite.model.crd.ExecutionCRD -import theodolite.model.crd.ExecutionStatus -import theodolite.model.crd.ExecutionState +import rocks.theodolite.kubernetes.benchmark.BenchmarkExecution +import rocks.theodolite.kubernetes.model.crd.ExecutionCRD +import rocks.theodolite.kubernetes.model.crd.ExecutionState +import rocks.theodolite.kubernetes.model.crd.ExecutionStatus class ExecutionCRDummy(name: String, benchmark: String) { diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTest.kt b/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTest.kt index c08e05653..cc6a6d1f9 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTest.kt +++ b/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTest.kt @@ -16,8 +16,11 @@ import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.Arguments import org.junit.jupiter.params.provider.MethodSource import org.mockito.kotlin.* -import theodolite.model.crd.ExecutionCRD -import theodolite.model.crd.ExecutionState +import rocks.theodolite.kubernetes.execution.operator.ExecutionEventHandler +import rocks.theodolite.kubernetes.execution.operator.ExecutionStateHandler +import rocks.theodolite.kubernetes.execution.operator.TheodoliteController +import rocks.theodolite.kubernetes.model.crd.ExecutionCRD +import rocks.theodolite.kubernetes.model.crd.ExecutionState import java.io.FileInputStream import java.util.stream.Stream diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTestWithInformer.kt b/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTestWithInformer.kt index adddc7056..f54a0dab5 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTestWithInformer.kt +++ b/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTestWithInformer.kt @@ -11,8 +11,11 @@ import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.Arguments import org.junit.jupiter.params.provider.MethodSource import org.mockito.kotlin.* -import theodolite.model.crd.ExecutionCRD -import theodolite.model.crd.ExecutionState +import rocks.theodolite.kubernetes.execution.operator.ExecutionEventHandler +import rocks.theodolite.kubernetes.execution.operator.ExecutionStateHandler +import rocks.theodolite.kubernetes.execution.operator.TheodoliteController +import rocks.theodolite.kubernetes.model.crd.ExecutionCRD +import rocks.theodolite.kubernetes.model.crd.ExecutionState import java.io.FileInputStream import java.util.concurrent.CountDownLatch import java.util.stream.Stream diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerWrapper.kt b/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerWrapper.kt index 5dbc515a7..62c9b0f2f 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerWrapper.kt +++ b/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerWrapper.kt @@ -1,13 +1,14 @@ package theodolite.execution.operator import io.fabric8.kubernetes.client.informers.ResourceEventHandler -import theodolite.model.crd.ExecutionCRD +import rocks.theodolite.kubernetes.execution.operator.ExecutionEventHandler +import rocks.theodolite.kubernetes.model.crd.ExecutionCRD class ExecutionEventHandlerWrapper( - private val executionEventHandler: ExecutionEventHandler, - private val afterOnAddCallback: () -> Unit, - private val afterOnUpdateCallback: () -> Unit, - private val afterOnDeleteCallback: () -> Unit + private val executionEventHandler: ExecutionEventHandler, + private val afterOnAddCallback: () -> Unit, + private val afterOnUpdateCallback: () -> Unit, + private val afterOnDeleteCallback: () -> Unit ) : ResourceEventHandler<ExecutionCRD> { override fun onAdd(execution: ExecutionCRD) { diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/SloFactoryTest.kt b/theodolite/src/test/kotlin/theodolite/execution/operator/SloFactoryTest.kt index c3dcd1b95..a6f3e572f 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/SloFactoryTest.kt +++ b/theodolite/src/test/kotlin/theodolite/execution/operator/SloFactoryTest.kt @@ -2,12 +2,12 @@ package theodolite.execution.operator import io.quarkus.test.junit.QuarkusTest import org.junit.jupiter.api.Test -import theodolite.benchmark.BenchmarkExecution -import theodolite.benchmark.BenchmarkExecution.SloConfiguration -import theodolite.benchmark.KubernetesBenchmark -import theodolite.benchmark.Slo -import theodolite.execution.SloFactory +import rocks.theodolite.kubernetes.benchmark.BenchmarkExecution +import rocks.theodolite.kubernetes.benchmark.BenchmarkExecution.SloConfiguration +import rocks.theodolite.kubernetes.execution.SloFactory import org.junit.jupiter.api.Assertions.* +import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmark +import rocks.theodolite.kubernetes.benchmark.Slo @QuarkusTest internal class SloFactoryTest { diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/StateHandlerTest.kt b/theodolite/src/test/kotlin/theodolite/execution/operator/StateHandlerTest.kt index 138f79ead..67b02d383 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/StateHandlerTest.kt +++ b/theodolite/src/test/kotlin/theodolite/execution/operator/StateHandlerTest.kt @@ -10,10 +10,10 @@ 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 theodolite.k8s.K8sManager -import theodolite.k8s.resourceLoader.K8sResourceLoaderFromFile -import theodolite.model.crd.ExecutionState -import java.time.Duration +import rocks.theodolite.kubernetes.execution.operator.ExecutionStateHandler +import rocks.theodolite.kubernetes.k8s.K8sManager +import rocks.theodolite.kubernetes.k8s.resourceLoader.K8sResourceLoaderFromFile +import rocks.theodolite.kubernetes.model.crd.ExecutionState @QuarkusTest @WithKubernetesTestServer diff --git a/theodolite/src/test/kotlin/theodolite/k8s/K8sManagerTest.kt b/theodolite/src/test/kotlin/theodolite/k8s/K8sManagerTest.kt index ffc3f2f2b..784c7480c 100644 --- a/theodolite/src/test/kotlin/theodolite/k8s/K8sManagerTest.kt +++ b/theodolite/src/test/kotlin/theodolite/k8s/K8sManagerTest.kt @@ -14,7 +14,9 @@ import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test -import theodolite.k8s.resourceLoader.K8sResourceLoaderFromFile +import rocks.theodolite.kubernetes.k8s.K8sContextFactory +import rocks.theodolite.kubernetes.k8s.K8sManager +import rocks.theodolite.kubernetes.k8s.resourceLoader.K8sResourceLoaderFromFile @QuarkusTest @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/theodolite/src/test/kotlin/theodolite/k8s/K8sResourceLoaderTest.kt b/theodolite/src/test/kotlin/theodolite/k8s/K8sResourceLoaderTest.kt index 4a41dac8b..79d925890 100644 --- a/theodolite/src/test/kotlin/theodolite/k8s/K8sResourceLoaderTest.kt +++ b/theodolite/src/test/kotlin/theodolite/k8s/K8sResourceLoaderTest.kt @@ -12,7 +12,8 @@ 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 theodolite.k8s.resourceLoader.K8sResourceLoaderFromFile +import rocks.theodolite.kubernetes.k8s.CustomResourceWrapper +import rocks.theodolite.kubernetes.k8s.resourceLoader.K8sResourceLoaderFromFile @QuarkusTest class K8sResourceLoaderTest { diff --git a/theodolite/src/test/kotlin/theodolite/model/crd/CRDExecutionTest.kt b/theodolite/src/test/kotlin/theodolite/model/crd/CRDExecutionTest.kt index 1150141ec..fb374bb75 100644 --- a/theodolite/src/test/kotlin/theodolite/model/crd/CRDExecutionTest.kt +++ b/theodolite/src/test/kotlin/theodolite/model/crd/CRDExecutionTest.kt @@ -11,15 +11,13 @@ import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test -import org.mockito.internal.matchers.apachecommons.ReflectionEquals -import org.apache.commons.lang3.builder.EqualsBuilder -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.instanceOf -import org.mockito.kotlin.isA import org.mockito.kotlin.mock -import theodolite.benchmark.BenchmarkExecution +import rocks.theodolite.kubernetes.execution.operator.ExecutionEventHandler +import rocks.theodolite.kubernetes.execution.operator.ExecutionStateHandler +import rocks.theodolite.kubernetes.execution.operator.TheodoliteController +import rocks.theodolite.kubernetes.model.crd.ExecutionCRD import theodolite.execution.operator.* -import theodolite.util.ConfigurationOverride +import rocks.theodolite.kubernetes.util.ConfigurationOverride import java.io.FileInputStream diff --git a/theodolite/src/test/kotlin/theodolite/model/crd/ExecutionStatusTest.kt b/theodolite/src/test/kotlin/theodolite/model/crd/ExecutionStatusTest.kt index 157bc1c03..2395ee877 100644 --- a/theodolite/src/test/kotlin/theodolite/model/crd/ExecutionStatusTest.kt +++ b/theodolite/src/test/kotlin/theodolite/model/crd/ExecutionStatusTest.kt @@ -7,6 +7,8 @@ import io.fabric8.kubernetes.api.model.Duration as K8sDuration import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertThrows +import rocks.theodolite.kubernetes.model.crd.ExecutionState +import rocks.theodolite.kubernetes.model.crd.ExecutionStatus import java.time.Clock import java.time.Duration import java.time.Instant diff --git a/theodolite/src/test/kotlin/theodolite/patcher/ConfigOverrideModifierTest.kt b/theodolite/src/test/kotlin/theodolite/patcher/ConfigOverrideModifierTest.kt index 1db1122e1..6b906bc46 100644 --- a/theodolite/src/test/kotlin/theodolite/patcher/ConfigOverrideModifierTest.kt +++ b/theodolite/src/test/kotlin/theodolite/patcher/ConfigOverrideModifierTest.kt @@ -4,8 +4,9 @@ import io.quarkus.test.junit.QuarkusTest import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test -import theodolite.benchmark.BenchmarkExecution -import theodolite.benchmark.KubernetesBenchmark +import rocks.theodolite.kubernetes.benchmark.BenchmarkExecution +import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmark +import rocks.theodolite.kubernetes.patcher.ConfigOverrideModifier import theodolite.execution.operator.BenchmarkCRDummy import theodolite.execution.operator.ExecutionCRDummy diff --git a/theodolite/src/test/kotlin/theodolite/strategies/restriction/LowerBoundRestrictionTest.kt b/theodolite/src/test/kotlin/theodolite/strategies/restriction/LowerBoundRestrictionTest.kt index e659d5f54..6188b404c 100644 --- a/theodolite/src/test/kotlin/theodolite/strategies/restriction/LowerBoundRestrictionTest.kt +++ b/theodolite/src/test/kotlin/theodolite/strategies/restriction/LowerBoundRestrictionTest.kt @@ -4,8 +4,9 @@ import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test -import theodolite.strategies.Metric -import theodolite.util.Results +import rocks.theodolite.core.strategies.Metric +import rocks.theodolite.core.strategies.restrictionstrategy.LowerBoundRestriction +import rocks.theodolite.core.util.Results internal class LowerBoundRestrictionTest { diff --git a/theodolite/src/test/kotlin/theodolite/util/ExecutionStateComparatorTest.kt b/theodolite/src/test/kotlin/theodolite/util/ExecutionStateComparatorTest.kt index ae80312af..566c62362 100644 --- a/theodolite/src/test/kotlin/theodolite/util/ExecutionStateComparatorTest.kt +++ b/theodolite/src/test/kotlin/theodolite/util/ExecutionStateComparatorTest.kt @@ -4,7 +4,8 @@ import io.quarkus.test.junit.QuarkusTest import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import theodolite.execution.operator.ExecutionCRDummy -import theodolite.model.crd.ExecutionState +import rocks.theodolite.kubernetes.model.crd.ExecutionState +import rocks.theodolite.kubernetes.util.ExecutionStateComparator @QuarkusTest diff --git a/theodolite/src/test/kotlin/theodolite/util/IOHandlerTest.kt b/theodolite/src/test/kotlin/theodolite/util/IOHandlerTest.kt index e2434277b..ad9bcce10 100644 --- a/theodolite/src/test/kotlin/theodolite/util/IOHandlerTest.kt +++ b/theodolite/src/test/kotlin/theodolite/util/IOHandlerTest.kt @@ -11,6 +11,7 @@ import org.junit.jupiter.api.Test import org.junit.rules.TemporaryFolder import org.junitpioneer.jupiter.ClearEnvironmentVariable import org.junitpioneer.jupiter.SetEnvironmentVariable +import rocks.theodolite.core.util.IOHandler const val FOLDER_URL = "Test-Folder" diff --git a/theodolite/src/test/kotlin/theodolite/util/ResultsTest.kt b/theodolite/src/test/kotlin/theodolite/util/ResultsTest.kt index d453587a9..4cb8b1c06 100644 --- a/theodolite/src/test/kotlin/theodolite/util/ResultsTest.kt +++ b/theodolite/src/test/kotlin/theodolite/util/ResultsTest.kt @@ -4,7 +4,8 @@ import io.quarkus.test.junit.QuarkusTest import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Test -import theodolite.strategies.Metric +import rocks.theodolite.core.strategies.Metric +import rocks.theodolite.core.util.Results @QuarkusTest internal class ResultsTest { -- GitLab