From f7213983281f614bbc0b4976dec2ca50cc9a6133 Mon Sep 17 00:00:00 2001 From: "stu126940@mail.uni-kiel.de" <stu126940@mail.uni-kiel.de> Date: Thu, 22 Jul 2021 16:35:38 +0200 Subject: [PATCH] minor code enhacements --- .../execution/operator/TheodoliteController.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt b/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt index a6a429a32..eb51a445e 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt +++ b/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt @@ -12,6 +12,10 @@ import theodolite.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" /** * The controller implementation for Theodolite. @@ -67,15 +71,15 @@ class TheodoliteController( ) modifier.setAdditionalLabels( labelValue = execution.name, - labelName = "deployed-for-execution" + labelName = DEPLOYED_FOR_EXECUTION_LABEL_NAME ) modifier.setAdditionalLabels( labelValue = benchmark.name, - labelName = "deployed-for-benchmark" + labelName = DEPLOYED_FOR_BENCHMARK_LABEL_NAME ) modifier.setAdditionalLabels( - labelValue = "theodolite", - labelName = "app.kubernetes.io/created-by" + labelValue = CREATED_BY_LABEL_VALUE, + labelName = CREATED_BY_LABEL_NAME ) executionStateHandler.setExecutionState(execution.name, States.RUNNING) -- GitLab