From 5ad15d27b9e89e9c6d9adcd4c531ef0777a9e246 Mon Sep 17 00:00:00 2001 From: "stu126940@mail.uni-kiel.de" <stu126940@mail.uni-kiel.de> Date: Tue, 23 Nov 2021 10:59:41 +0100 Subject: [PATCH] small enhancements --- .../kotlin/theodolite/benchmark/ConfigMapResourceSet.kt | 7 ++++--- .../src/main/kotlin/theodolite/model/crd/BenchmarkCRD.kt | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/ConfigMapResourceSet.kt b/theodolite/src/main/kotlin/theodolite/benchmark/ConfigMapResourceSet.kt index 1f89549fb..273a13170 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/ConfigMapResourceSet.kt +++ b/theodolite/src/main/kotlin/theodolite/benchmark/ConfigMapResourceSet.kt @@ -23,9 +23,6 @@ class ConfigMapResourceSet: ResourceSet, KubernetesResource { @OptIn(ExperimentalStdlibApi::class) override fun getResourceSet(client: NamespacedKubernetesClient): Collection<Pair<String, KubernetesResource>> { val loader = K8sResourceLoaderFromString(client) - - logger.info {"use namespace: ${client.namespace} in configmap resource set" } - var resources: Map<String, String> try { @@ -44,6 +41,10 @@ class ConfigMapResourceSet: ResourceSet, KubernetesResource { if (::files.isInitialized){ resources = resources .filter { files.contains(it.key) } + + if (resources.size != files.size) { + throw DeploymentFailedException("Could not find all specified Kubernetes manifests files") + } } return try { diff --git a/theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkCRD.kt b/theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkCRD.kt index 8c58db0eb..b6468fff5 100644 --- a/theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkCRD.kt +++ b/theodolite/src/main/kotlin/theodolite/model/crd/BenchmarkCRD.kt @@ -16,4 +16,4 @@ import theodolite.benchmark.KubernetesBenchmark class BenchmarkCRD( var spec: KubernetesBenchmark = KubernetesBenchmark(), var status: BenchmarkStatus = BenchmarkStatus() -) : CustomResource<KubernetesBenchmark, Void>(), Namespaced, HasMetadata \ No newline at end of file +) : CustomResource<KubernetesBenchmark, BenchmarkStatus>(), Namespaced, HasMetadata \ No newline at end of file -- GitLab