From c9b9f892d1188a298c94938403c5678538cf4a80 Mon Sep 17 00:00:00 2001 From: "stu126940@mail.uni-kiel.de" <stu126940@mail.uni-kiel.de> Date: Thu, 8 Apr 2021 21:07:21 +0200 Subject: [PATCH] Fix ReplicaPatcher switch from Int to String and get the value to patch via parseInt(value) --- .../src/main/kotlin/theodolite/patcher/ReplicaPatcher.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/patcher/ReplicaPatcher.kt b/theodolite-quarkus/src/main/kotlin/theodolite/patcher/ReplicaPatcher.kt index ca34e9e35..b4b33fabc 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/patcher/ReplicaPatcher.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/patcher/ReplicaPatcher.kt @@ -4,10 +4,10 @@ import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.api.model.apps.Deployment class ReplicaPatcher(private val k8sResource: KubernetesResource) : AbstractPatcher(k8sResource) { - override fun <Int> patch(value: Int) { + override fun <String> patch(value: String) { if (k8sResource is Deployment) { - if (value is kotlin.Int) { - this.k8sResource.spec.replicas = value + if (value is kotlin.String) { + this.k8sResource.spec.replicas = Integer.parseInt(value) } } } -- GitLab