From a1c49d55f4619d47d4029f83c23fb431aa520578 Mon Sep 17 00:00:00 2001
From: lorenz <stu203404@mail.uni-kiel.de>
Date: Sat, 30 Jan 2021 19:36:29 +0100
Subject: [PATCH] Add setReplica to DeploymentManager

---
 .../main/kotlin/theodolite/execution/DeploymentManager.kt  | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/DeploymentManager.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/DeploymentManager.kt
index 12eeb73b6..3e602906d 100644
--- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/DeploymentManager.kt
+++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/DeploymentManager.kt
@@ -66,6 +66,13 @@ class DeploymentManager(client: NamespacedKubernetesClient) {
         }
     }
 
+    /**
+     * Change the image name of a container (SUT and the Worklaodgenerators)
+     */
+    fun setReplica(deployment: Deployment, replicas: Int) {
+        deployment.spec.setReplicas(replicas)
+    }
+
     // TODO potential add exception handling
     fun deploy(deployment: Deployment) {
         client.apps().deployments().create(deployment)
-- 
GitLab