From f433892588ad77490d8c18cdcba36b5426c14430 Mon Sep 17 00:00:00 2001 From: "stu126940@mail.uni-kiel.de" <stu126940@mail.uni-kiel.de> Date: Mon, 16 May 2022 09:38:30 +0200 Subject: [PATCH] fix typo --- .../src/main/kotlin/theodolite/patcher/AbstractPatcher.kt | 4 ++-- .../src/main/kotlin/theodolite/patcher/EnvVarPatcher.kt | 2 +- theodolite/src/main/kotlin/theodolite/patcher/ImagePatcher.kt | 4 ++-- theodolite/src/main/kotlin/theodolite/patcher/LabelPatcher.kt | 2 +- .../src/main/kotlin/theodolite/patcher/MatchLabelPatcher.kt | 2 +- theodolite/src/main/kotlin/theodolite/patcher/NamePatcher.kt | 2 +- .../src/main/kotlin/theodolite/patcher/NodeSelectorPatcher.kt | 2 +- .../patcher/NumNestedGroupsLoadGeneratorReplicaPatcher.kt | 2 +- .../patcher/NumSensorsLoadGeneratorReplicaPatcher.kt | 2 +- .../src/main/kotlin/theodolite/patcher/ReplicaPatcher.kt | 2 +- .../main/kotlin/theodolite/patcher/ResourceLimitPatcher.kt | 2 +- .../main/kotlin/theodolite/patcher/ResourceRequestPatcher.kt | 2 +- .../main/kotlin/theodolite/patcher/SchedulerNamePatcher.kt | 2 +- .../main/kotlin/theodolite/patcher/ServiceSelectorPatcher.kt | 2 +- .../main/kotlin/theodolite/patcher/TemplateLabelPatcher.kt | 2 +- .../main/kotlin/theodolite/patcher/VolumesConfigMapPatcher.kt | 2 +- 16 files changed, 18 insertions(+), 18 deletions(-) diff --git a/theodolite/src/main/kotlin/theodolite/patcher/AbstractPatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/AbstractPatcher.kt index c3353c7cb..fbbb7fa1d 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/AbstractPatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/AbstractPatcher.kt @@ -22,9 +22,9 @@ abstract class AbstractPatcher : Patcher { override fun patch(resources: List<HasMetadata>, value: String) : List<HasMetadata> { return resources .map { Serialization.clone(it)} - .map { patchSingeResource(it, value) } + .map { patchSingleResource(it, value) } } - abstract fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata + abstract fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata } \ No newline at end of file diff --git a/theodolite/src/main/kotlin/theodolite/patcher/EnvVarPatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/EnvVarPatcher.kt index 0f1672fa2..ee9587121 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/EnvVarPatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/EnvVarPatcher.kt @@ -17,7 +17,7 @@ class EnvVarPatcher( ) : AbstractPatcher() { - override fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata { + override fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata { if (resource is Deployment) { this.setEnv( resource, this.container, diff --git a/theodolite/src/main/kotlin/theodolite/patcher/ImagePatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/ImagePatcher.kt index b6417d410..2918c8259 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/ImagePatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/ImagePatcher.kt @@ -17,10 +17,10 @@ class ImagePatcher( override fun patch(resources: List<HasMetadata>, value: String) : List<HasMetadata> { return resources .map { Serialization.clone(it) } - .map { patchSingeResource(it, value as kotlin.String) } + .map { patchSingleResource(it, value as kotlin.String) } } - override fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata { + override fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata { if (resource is Deployment) { (resource).spec.template.spec.containers.filter { it.name == container }.forEach { it.image = value diff --git a/theodolite/src/main/kotlin/theodolite/patcher/LabelPatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/LabelPatcher.kt index 10fa87aed..9a98f9689 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/LabelPatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/LabelPatcher.kt @@ -11,7 +11,7 @@ class LabelPatcher( val variableName: String) : AbstractPatcher() { - override fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata { + override fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata { when (resource) { is Deployment -> { if (resource.metadata.labels == null) { diff --git a/theodolite/src/main/kotlin/theodolite/patcher/MatchLabelPatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/MatchLabelPatcher.kt index a0936c648..693d751f2 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/MatchLabelPatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/MatchLabelPatcher.kt @@ -13,7 +13,7 @@ class MatchLabelPatcher( val variableName: String) : AbstractPatcher() { - override fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata { + override fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata { when (resource) { is Deployment -> { if (resource.spec.selector.matchLabels == null) { diff --git a/theodolite/src/main/kotlin/theodolite/patcher/NamePatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/NamePatcher.kt index 341029456..74fae3901 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/NamePatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/NamePatcher.kt @@ -9,7 +9,7 @@ import io.fabric8.kubernetes.api.model.apps.StatefulSet class NamePatcher : AbstractPatcher() { - override fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata { + override fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata { when (resource) { is Deployment -> { resource.metadata.name = value diff --git a/theodolite/src/main/kotlin/theodolite/patcher/NodeSelectorPatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/NodeSelectorPatcher.kt index 60ff38a07..b608d3b10 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/NodeSelectorPatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/NodeSelectorPatcher.kt @@ -13,7 +13,7 @@ class NodeSelectorPatcher( AbstractPatcher() { - override fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata { + override fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata { if (resource is Deployment) { resource.spec.template.spec.nodeSelector = mapOf(variableName to value) } diff --git a/theodolite/src/main/kotlin/theodolite/patcher/NumNestedGroupsLoadGeneratorReplicaPatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/NumNestedGroupsLoadGeneratorReplicaPatcher.kt index a9ce4664b..deee1b6ef 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/NumNestedGroupsLoadGeneratorReplicaPatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/NumNestedGroupsLoadGeneratorReplicaPatcher.kt @@ -9,7 +9,7 @@ class NumNestedGroupsLoadGeneratorReplicaPatcher( private val loadGenMaxRecords: String, ) : AbstractPatcher() { - override fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata { + override fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata { if (resource is Deployment) { val approxNumSensors = numSensors.toDouble().pow(Integer.parseInt(value).toDouble()) val loadGenInstances = diff --git a/theodolite/src/main/kotlin/theodolite/patcher/NumSensorsLoadGeneratorReplicaPatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/NumSensorsLoadGeneratorReplicaPatcher.kt index 72a1c39e0..8463d6726 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/NumSensorsLoadGeneratorReplicaPatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/NumSensorsLoadGeneratorReplicaPatcher.kt @@ -8,7 +8,7 @@ class NumSensorsLoadGeneratorReplicaPatcher( private val loadGenMaxRecords: String, ) : AbstractPatcher() { - override fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata { + override fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata { if (resource is Deployment) { val loadGenInstances = (Integer.parseInt(value) + loadGenMaxRecords.toInt() - 1) / loadGenMaxRecords.toInt() diff --git a/theodolite/src/main/kotlin/theodolite/patcher/ReplicaPatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/ReplicaPatcher.kt index 01c9d5152..837bebf9d 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/ReplicaPatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/ReplicaPatcher.kt @@ -9,7 +9,7 @@ import io.fabric8.kubernetes.api.model.apps.Deployment */ class ReplicaPatcher : AbstractPatcher() { - override fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata { + override fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata { if (resource is Deployment) { resource.spec.replicas = Integer.parseInt(value) } diff --git a/theodolite/src/main/kotlin/theodolite/patcher/ResourceLimitPatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/ResourceLimitPatcher.kt index c6aa37d3d..8b75d43bf 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/ResourceLimitPatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/ResourceLimitPatcher.kt @@ -17,7 +17,7 @@ class ResourceLimitPatcher( private val limitedResource: String ) : AbstractPatcher() { - override fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata { + override fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata { when (resource) { is Deployment -> { resource.spec.template.spec.containers.filter { it.name == container }.forEach { diff --git a/theodolite/src/main/kotlin/theodolite/patcher/ResourceRequestPatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/ResourceRequestPatcher.kt index e67d614fe..f63386e55 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/ResourceRequestPatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/ResourceRequestPatcher.kt @@ -17,7 +17,7 @@ class ResourceRequestPatcher( ) : AbstractPatcher() { - override fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata { + override fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata { when (resource) { is Deployment -> { resource.spec.template.spec.containers.filter { it.name == container }.forEach { diff --git a/theodolite/src/main/kotlin/theodolite/patcher/SchedulerNamePatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/SchedulerNamePatcher.kt index 00a77c4e9..fc6a2864b 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/SchedulerNamePatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/SchedulerNamePatcher.kt @@ -11,7 +11,7 @@ import io.fabric8.kubernetes.api.model.apps.Deployment class SchedulerNamePatcher : AbstractPatcher() { - override fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata { + override fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata { if (resource is Deployment) { resource.spec.template.spec.schedulerName = value } diff --git a/theodolite/src/main/kotlin/theodolite/patcher/ServiceSelectorPatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/ServiceSelectorPatcher.kt index 99d8f07fa..3d94e2839 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/ServiceSelectorPatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/ServiceSelectorPatcher.kt @@ -7,7 +7,7 @@ class ServiceSelectorPatcher( private var variableName: String ) : AbstractPatcher() { - override fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata { + override fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata { if (resource is Service) { if (resource.spec.selector == null) { resource.spec.selector = mutableMapOf() diff --git a/theodolite/src/main/kotlin/theodolite/patcher/TemplateLabelPatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/TemplateLabelPatcher.kt index 2a6ee13fe..2707d98e0 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/TemplateLabelPatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/TemplateLabelPatcher.kt @@ -14,7 +14,7 @@ class TemplateLabelPatcher( AbstractPatcher() { - override fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata { + override fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata { when (resource) { is Deployment -> { if (resource.spec.template.metadata.labels == null) { diff --git a/theodolite/src/main/kotlin/theodolite/patcher/VolumesConfigMapPatcher.kt b/theodolite/src/main/kotlin/theodolite/patcher/VolumesConfigMapPatcher.kt index 73f55a0f6..17068c7e7 100644 --- a/theodolite/src/main/kotlin/theodolite/patcher/VolumesConfigMapPatcher.kt +++ b/theodolite/src/main/kotlin/theodolite/patcher/VolumesConfigMapPatcher.kt @@ -7,7 +7,7 @@ import io.fabric8.kubernetes.api.model.apps.StatefulSet class VolumesConfigMapPatcher(private var volumeName: String ) : AbstractPatcher() { - override fun patchSingeResource(resource: HasMetadata, value: String): HasMetadata { + override fun patchSingleResource(resource: HasMetadata, value: String): HasMetadata { if (resource is Deployment) { if (resource.spec.template.spec.volumes == null) { resource.spec.template.spec.volumes = mutableListOf() -- GitLab