diff --git a/docs/crd-docu.md b/docs/crd-docu.md index 4002f9b0ec50bcc64822799a0256b30dd37ac9e4..400e888af53a59353e68440ceb34d32c6a72506f 100644 --- a/docs/crd-docu.md +++ b/docs/crd-docu.md @@ -79,19 +79,21 @@ Resource Types: </tr> </thead> <tbody><tr> - <td><b>name</b></td> - <td>string</td> + <td><b><a href="#benchmarkspecinfrastructure">infrastructure</a></b></td> + <td>object</td> <td> - This field exists only for technical reasons and should not be set by the user. The value of the field will be overwritten.<br/> + (Optional) A list of file names that reference Kubernetes resources that are deployed on the cluster to create the required infrastructure.<br/> + <br/> + <i>Default</i>: map[]<br/> </td> <td>false</td> </tr><tr> - <td><b><a href="#benchmarkspecappresourcesetsindex">appResourceSets</a></b></td> - <td>[]object</td> + <td><b>name</b></td> + <td>string</td> <td> - The appResourceSets specifies all Kubernetes resources required to start the sut. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet.<br/> + This field exists only for technical reasons and should not be set by the user. The value of the field will be overwritten.<br/> </td> - <td>true</td> + <td>false</td> </tr><tr> <td><b><a href="#benchmarkspeckafkaconfig">kafkaConfig</a></b></td> <td>object</td> @@ -100,8 +102,8 @@ Resource Types: </td> <td>true</td> </tr><tr> - <td><b><a href="#benchmarkspecloadgenresourcesetsindex">loadGenResourceSets</a></b></td> - <td>[]object</td> + <td><b><a href="#benchmarkspecloadgenerator">loadGenerator</a></b></td> + <td>object</td> <td> The loadGenResourceSets specifies all Kubernetes resources required to start the load generator. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet.<br/> </td> @@ -120,15 +122,51 @@ Resource Types: A list of resource types that can be scaled for this `benchmark` resource. For each resource type the concrete values are defined in the `execution` object.<br/> </td> <td>true</td> + </tr><tr> + <td><b><a href="#benchmarkspecsut">sut</a></b></td> + <td>object</td> + <td> + The appResourceSets specifies all Kubernetes resources required to start the sut. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet.<br/> + </td> + <td>true</td> </tr></tbody> </table> -### benchmark.spec.appResourceSets[index] +### benchmark.spec.infrastructure <sup><sup>[↩ Parent](#benchmarkspec)</sup></sup> +(Optional) A list of file names that reference Kubernetes resources that are deployed on the cluster to create the required infrastructure. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b><a href="#benchmarkspecinfrastructureresourcesindex">resources</a></b></td> + <td>[]object</td> + <td> + <br/> + <br/> + <i>Default</i>: []<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.infrastructure.resources[index] +<sup><sup>[↩ Parent](#benchmarkspecinfrastructure)</sup></sup> + + + <table> @@ -141,14 +179,14 @@ Resource Types: </tr> </thead> <tbody><tr> - <td><b><a href="#benchmarkspecappresourcesetsindexconfigmap">configMap</a></b></td> + <td><b><a href="#benchmarkspecinfrastructureresourcesindexconfigmap">configMap</a></b></td> <td>object</td> <td> The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap.<br/> </td> <td>false</td> </tr><tr> - <td><b><a href="#benchmarkspecappresourcesetsindexfilesystem">fileSystem</a></b></td> + <td><b><a href="#benchmarkspecinfrastructureresourcesindexfilesystem">fileSystem</a></b></td> <td>object</td> <td> The fileSystem resourceSet loads the Kubernetes manifests from the filesystem.<br/> @@ -158,8 +196,8 @@ Resource Types: </table> -### benchmark.spec.appResourceSets[index].configMap -<sup><sup>[↩ Parent](#benchmarkspecappresourcesetsindex)</sup></sup> +### benchmark.spec.infrastructure.resources[index].configMap +<sup><sup>[↩ Parent](#benchmarkspecinfrastructureresourcesindex)</sup></sup> @@ -192,8 +230,8 @@ The configMap resourceSet loads the Kubernetes manifests from an Kubernetes conf </table> -### benchmark.spec.appResourceSets[index].fileSystem -<sup><sup>[↩ Parent](#benchmarkspecappresourcesetsindex)</sup></sup> +### benchmark.spec.infrastructure.resources[index].fileSystem +<sup><sup>[↩ Parent](#benchmarkspecinfrastructureresourcesindex)</sup></sup> @@ -316,11 +354,40 @@ Contains the Kafka configuration. </table> -### benchmark.spec.loadGenResourceSets[index] +### benchmark.spec.loadGenerator <sup><sup>[↩ Parent](#benchmarkspec)</sup></sup> +The loadGenResourceSets specifies all Kubernetes resources required to start the load generator. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b><a href="#benchmarkspecloadgeneratorresourcesindex">resources</a></b></td> + <td>[]object</td> + <td> + <br/> + <br/> + <i>Default</i>: []<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.loadGenerator.resources[index] +<sup><sup>[↩ Parent](#benchmarkspecloadgenerator)</sup></sup> + + + <table> @@ -333,14 +400,14 @@ Contains the Kafka configuration. </tr> </thead> <tbody><tr> - <td><b><a href="#benchmarkspecloadgenresourcesetsindexconfigmap">configMap</a></b></td> + <td><b><a href="#benchmarkspecloadgeneratorresourcesindexconfigmap">configMap</a></b></td> <td>object</td> <td> The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap.<br/> </td> <td>false</td> </tr><tr> - <td><b><a href="#benchmarkspecloadgenresourcesetsindexfilesystem">fileSystem</a></b></td> + <td><b><a href="#benchmarkspecloadgeneratorresourcesindexfilesystem">fileSystem</a></b></td> <td>object</td> <td> The fileSystem resourceSet loads the Kubernetes manifests from the filesystem.<br/> @@ -350,8 +417,8 @@ Contains the Kafka configuration. </table> -### benchmark.spec.loadGenResourceSets[index].configMap -<sup><sup>[↩ Parent](#benchmarkspecloadgenresourcesetsindex)</sup></sup> +### benchmark.spec.loadGenerator.resources[index].configMap +<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorresourcesindex)</sup></sup> @@ -384,8 +451,8 @@ The configMap resourceSet loads the Kubernetes manifests from an Kubernetes conf </table> -### benchmark.spec.loadGenResourceSets[index].fileSystem -<sup><sup>[↩ Parent](#benchmarkspecloadgenresourcesetsindex)</sup></sup> +### benchmark.spec.loadGenerator.resources[index].fileSystem +<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorresourcesindex)</sup></sup> @@ -579,6 +646,137 @@ The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. </tr></tbody> </table> + +### benchmark.spec.sut +<sup><sup>[↩ Parent](#benchmarkspec)</sup></sup> + + + +The appResourceSets specifies all Kubernetes resources required to start the sut. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b><a href="#benchmarkspecsutresourcesindex">resources</a></b></td> + <td>[]object</td> + <td> + <br/> + <br/> + <i>Default</i>: []<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.sut.resources[index] +<sup><sup>[↩ Parent](#benchmarkspecsut)</sup></sup> + + + + + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b><a href="#benchmarkspecsutresourcesindexconfigmap">configMap</a></b></td> + <td>object</td> + <td> + The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap.<br/> + </td> + <td>false</td> + </tr><tr> + <td><b><a href="#benchmarkspecsutresourcesindexfilesystem">fileSystem</a></b></td> + <td>object</td> + <td> + The fileSystem resourceSet loads the Kubernetes manifests from the filesystem.<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.sut.resources[index].configMap +<sup><sup>[↩ Parent](#benchmarkspecsutresourcesindex)</sup></sup> + + + +The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>files</b></td> + <td>[]string</td> + <td> + (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded.<br/> + </td> + <td>false</td> + </tr><tr> + <td><b>name</b></td> + <td>string</td> + <td> + The name of the configMap<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.sut.resources[index].fileSystem +<sup><sup>[↩ Parent](#benchmarkspecsutresourcesindex)</sup></sup> + + + +The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>files</b></td> + <td>[]string</td> + <td> + (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded.<br/> + </td> + <td>false</td> + </tr><tr> + <td><b>path</b></td> + <td>string</td> + <td> + The path to the folder which contains the Kubernetes manifests files.<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + ## execution <sup><sup>[↩ Parent](#theodolitecomv1 )</sup></sup> diff --git a/theodolite-benchmarks/definitions/uc1-flink/uc1-flink-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc1-flink/uc1-flink-benchmark-operator.yaml index 070a2cd89b64fde8fc462709112e2af1f1e79544..fb985d4574b7c04590c0ebff963acc47b7a8f85e 100644 --- a/theodolite-benchmarks/definitions/uc1-flink/uc1-flink-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc1-flink/uc1-flink-benchmark-operator.yaml @@ -3,23 +3,25 @@ kind: benchmark metadata: name: uc1-flink spec: - appResourceSets: - - configMap: - name: "benchmark-resources-uc1-flink" - files: - - "uc1-flink/flink-configuration-configmap.yaml" - - "uc1-flink/taskmanager-deployment.yaml" - - "uc1-flink/taskmanager-service.yaml" - - "uc1-flink/service-monitor.yaml" - - "uc1-flink/jobmanager-service.yaml" - - "uc1-flink/jobmanager-deployment.yaml" - #- "uc1-flink/jobmanager-rest-service.yaml" - loadGenResourceSets: - - configMap: - name: "benchmark-resources-uc1-loadgen" - files: - - "uc1-kstreams/uc1-load-generator-deployment.yaml" - - "uc1-kstreams/uc1-load-generator-service.yaml" + sut: + resources: + - configMap: + name: "benchmark-resources-uc1-flink" + files: + - "flink-configuration-configmap.yaml" + - "taskmanager-deployment.yaml" + - "taskmanager-service.yaml" + - "service-monitor.yaml" + - "jobmanager-service.yaml" + - "jobmanager-deployment.yaml" + #- "jobmanager-rest-service.yaml" + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc1-loadgen" + files: + - "uc1-load-generator-deployment.yaml" + - "uc1-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-operator.yaml index 283b3baa53b2090b445a379641086f2dc6c7753e..3532e5d8cb869209309111c1654e4126b3dd6d2f 100644 --- a/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-operator.yaml @@ -3,20 +3,22 @@ kind: benchmark metadata: name: uc1-kstreams spec: - appResourceSets: - - configMap: - name: "benchmark-resources-uc1-kstreams" - files: - - "uc1-kstreams/uc1-kstreams-deployment.yaml" - - "uc1-kstreams/uc1-kstreams-service.yaml" - - "uc1-kstreams/uc1-jmx-configmap.yaml" - - "uc1-kstreams/uc1-service-monitor.yaml" - loadGenResourceSets: - - configMap: - name: "benchmark-resources-uc1-loadgen" - files: - - "uc1-kstreams/uc1-load-generator-deployment.yaml" - - "uc1-kstreams/uc1-load-generator-service.yaml" + sut: + resources: + - configMap: + name: "benchmark-resources-uc1-kstreams" + files: + - "uc1-kstreams-deployment.yaml" + - "uc1-kstreams-service.yaml" + - "uc1-jmx-configmap.yaml" + - "uc1-service-monitor.yaml" + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc1-loadgen" + files: + - "uc1-load-generator-deployment.yaml" + - "uc1-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-standalone.yaml b/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-standalone.yaml index b90edf5e4dcae0a4f338fb5edb90c73f34b3d14b..58f6d89d610f4eb8bd5ed34c5ab64850d7570154 100644 --- a/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-standalone.yaml +++ b/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-standalone.yaml @@ -1,18 +1,20 @@ name: "uc1-kstreams" -appResourceSet: - - configMap: - name: "benchmark-resources-uc1-kstreams" - files: - - "uc1-kstreams/uc1-kstreams-deployment.yaml" - - "uc1-kstreams/uc1-kstreams-service.yaml" - - "uc1-kstreams/uc1-jmx-configmap.yaml" - - "uc1-kstreams/uc1-service-monitor.yaml" -loadGenResourceSet: - - configMap: - name: "benchmark-resources-uc1-loadgen" - files: - - "uc1-kstreams/uc1-load-generator-deployment.yaml" - - "uc1-kstreams/uc1-load-generator-service.yaml" +sut: + resources: + - configMap: + name: "benchmark-resources-uc1-kstreams" + files: + - "uc1-kstreams-deployment.yaml" + - "uc1-kstreams-service.yaml" + - "uc1-jmx-configmap.yaml" + - "uc1-service-monitor.yaml" +loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc1-loadgen" + files: + - "uc1-load-generator-deployment.yaml" + - "uc1-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc2-flink/uc2-flink-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc2-flink/uc2-flink-benchmark-operator.yaml index dcbdf57efe7397d2a7b646b6388550e205f39957..d87d7575be5525ed78ab6ad2815dcbf66639838f 100644 --- a/theodolite-benchmarks/definitions/uc2-flink/uc2-flink-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc2-flink/uc2-flink-benchmark-operator.yaml @@ -3,23 +3,25 @@ kind: benchmark metadata: name: uc2-flink spec: - appResourceSets: - - configMap: - name: "benchmark-resources-uc2-flink" - files: - - "uc2-flink/flink-configuration-configmap.yaml" - - "uc2-flink/taskmanager-deployment.yaml" - - "uc2-flink/taskmanager-service.yaml" - - "uc2-flink/service-monitor.yaml" - - "uc2-flink/jobmanager-service.yaml" - - "uc2-flink/jobmanager-deployment.yaml" - #- "uc2-flink/jobmanager-rest-service.yaml" - loadGenResourceSets: - - configMap: - name: "benchmark-resources-uc2-loadgen" - files: - - "uc2-kstreams/uc2-load-generator-deployment.yaml" - - "uc2-kstreams/uc2-load-generator-service.yaml" + sut: + resources: + - configMap: + name: "benchmark-resources-uc2-flink" + files: + - "flink-configuration-configmap.yaml" + - "taskmanager-deployment.yaml" + - "taskmanager-service.yaml" + - "service-monitor.yaml" + - "jobmanager-service.yaml" + - "jobmanager-deployment.yaml" + #- "jobmanager-rest-service.yaml" + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc2-loadgen" + files: + - "uc2-load-generator-deployment.yaml" + - "uc2-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-operator.yaml index aaf479ae89329cabb1180925bb8984b25f40aa48..302fe6b251415ecc94e09961d7471cdce4fdaa39 100644 --- a/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-operator.yaml @@ -3,20 +3,22 @@ kind: benchmark metadata: name: uc2-kstreams spec: - appResourceSets: + sut: + resources: - configMap: name: "benchmark-resources-uc2-kstreams" files: - - "uc2-kstreams/uc2-kstreams-deployment.yaml" - - "uc2-kstreams/uc2-kstreams-service.yaml" - - "uc2-kstreams/uc2-jmx-configmap.yaml" - - "uc2-kstreams/uc2-service-monitor.yaml" - loadGenResourceSets: - - configMap: - name: "benchmark-resources-uc2-loadgen" - files: - - "uc2-kstreams/uc2-load-generator-deployment.yaml" - - "uc2-kstreams/uc2-load-generator-service.yaml" + - "uc2-kstreams-deployment.yaml" + - "uc2-kstreams-service.yaml" + - "uc2-jmx-configmap.yaml" + - "uc2-service-monitor.yaml" + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc2-loadgen" + files: + - "uc2-load-generator-deployment.yaml" + - "uc2-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-standalone.yaml b/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-standalone.yaml index b0dbd6bf26b1751add491836a76580e5ce980611..d70c4669ff485eeb801e6db16f9d333d843d3f51 100644 --- a/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-standalone.yaml +++ b/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-standalone.yaml @@ -1,18 +1,20 @@ name: "uc2-kstreams" -appResourceSets: - - configMap: - name: "benchmark-resources-uc2-kstreams" - files: - - "uc2-kstreams/uc2-kstreams-deployment.yaml" - - "uc2-kstreams/uc2-kstreams-service.yaml" - - "uc2-kstreams/uc2-jmx-configmap.yaml" - - "uc2-kstreams/uc2-service-monitor.yaml" -loadGenResourceSets: - - configMap: - name: "benchmark-resources-uc2-loadgen" - files: - - "uc2-kstreams/uc2-load-generator-deployment.yaml" - - "uc2-kstreams/uc2-load-generator-service.yaml" +sut: + resources: + - configMap: + name: "benchmark-resources-uc2-kstreams" + files: + - "uc2-kstreams-deployment.yaml" + - "uc2-kstreams-service.yaml" + - "uc2-jmx-configmap.yaml" + - "uc2-service-monitor.yaml" +loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc2-loadgen" + files: + - "uc2-load-generator-deployment.yaml" + - "uc2-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc3-flink/uc3-flink-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc3-flink/uc3-flink-benchmark-operator.yaml index 7ba17f8e4dee447e7adda0f7c3d0e16eb01f35c5..bd58d7de0b985d7f4a3f5d0a8ea01e1947de5af9 100644 --- a/theodolite-benchmarks/definitions/uc3-flink/uc3-flink-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc3-flink/uc3-flink-benchmark-operator.yaml @@ -3,23 +3,25 @@ kind: benchmark metadata: name: uc3-flink spec: - appResourceSets: - - configMap: - name: "benchmark-resources-uc3-flink" - files: - - "uc3-flink/flink-configuration-configmap.yaml" - - "uc3-flink/taskmanager-deployment.yaml" - - "uc3-flink/taskmanager-service.yaml" - - "uc3-flink/service-monitor.yaml" - - "uc3-flink/jobmanager-service.yaml" - - "uc3-flink/jobmanager-deployment.yaml" - #- "uc3-flink/jobmanager-rest-service.yaml" - loadGenResourceSets: - - configMap: - name: "benchmark-resources-uc3-loadgen" - files: - - "uc3-kstreams/uc3-load-generator-deployment.yaml" - - "uc3-kstreams/uc3-load-generator-service.yaml" + sut: + resources: + - configMap: + name: "benchmark-resources-uc3-flink" + files: + - "flink-configuration-configmap.yaml" + - "taskmanager-deployment.yaml" + - "taskmanager-service.yaml" + - "service-monitor.yaml" + - "jobmanager-service.yaml" + - "jobmanager-deployment.yaml" + #- "jobmanager-rest-service.yaml" + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc3-loadgen" + files: + - "uc3-load-generator-deployment.yaml" + - "uc3-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-operator.yaml index ef49aac8bcfbe5d3798982689fc73b540d0aade7..9151fb14ec77d3ace0cf0fe491c37dd624a335f1 100644 --- a/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-operator.yaml @@ -3,20 +3,22 @@ kind: benchmark metadata: name: uc3-kstreams spec: - appResourceSets: - - configMap: - name: "benchmark-resources-uc3-kstreams" - files: - - "uc3-kstreams/uc3-kstreams-deployment.yaml" - - "uc3-kstreams/uc3-kstreams-service.yaml" - - "uc3-kstreams/uc3-jmx-configmap.yaml" - - "uc3-kstreams/uc3-service-monitor.yaml" - loadGenResourceSets: - - configMap: - name: "benchmark-resources-uc3-loadgen" - files: - - "uc3-kstreams/uc3-load-generator-deployment.yaml" - - "uc3-kstreams/uc3-load-generator-service.yaml" + sut: + resources: + - configMap: + name: "benchmark-resources-uc3-kstreams" + files: + - "uc3-kstreams-deployment.yaml" + - "uc3-kstreams-service.yaml" + - "uc3-jmx-configmap.yaml" + - "uc3-service-monitor.yaml" + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc3-loadgen" + files: + - "uc3-load-generator-deployment.yaml" + - "uc3-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-standalone.yaml b/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-standalone.yaml index 8bb0b6733bc474d224def09cf22b0315c050b5dd..8783a3d5e2efffe723d52d1f260a4914a6e6f578 100644 --- a/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-standalone.yaml +++ b/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-standalone.yaml @@ -1,18 +1,20 @@ name: "uc3-kstreams" -appResourceSets: - - configMap: - name: "benchmark-resources-uc3-kstreams" - files: - - "uc3-kstreams/uc3-kstreams-deployment.yaml" - - "uc3-kstreams/uc3-kstreams-service.yaml" - - "uc3-kstreams/uc3-jmx-configmap.yaml" - - "uc3-kstreams/uc3-service-monitor.yaml" -loadGenResourceSets: - - configMap: - name: "benchmark-resources-uc3-loadgen" - files: - - "uc3-kstreams/uc3-load-generator-deployment.yaml" - - "uc3-kstreams/uc3-load-generator-service.yaml" +sut: + resources: + - configMap: + name: "benchmark-resources-uc3-kstreams" + files: + - "uc3-kstreams-deployment.yaml" + - "uc3-kstreams-service.yaml" + - "uc3-jmx-configmap.yaml" + - "uc3-service-monitor.yaml" +loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc3-loadgen" + files: + - "uc3-load-generator-deployment.yaml" + - "uc3-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc4-flink/uc4-flink-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc4-flink/uc4-flink-benchmark-operator.yaml index a6e427af267602a5a862b34270d44c299282ba55..0ee6a3d9b2879bbb1642cb0c0bfb3984f53b66ac 100644 --- a/theodolite-benchmarks/definitions/uc4-flink/uc4-flink-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc4-flink/uc4-flink-benchmark-operator.yaml @@ -3,23 +3,25 @@ kind: benchmark metadata: name: uc4-flink spec: - appResourceSets: - - configMap: - name: "benchmark-resources-uc4-flink" - files: - - "uc4-flink/flink-configuration-configmap.yaml" - - "uc4-flink/taskmanager-deployment.yaml" - - "uc4-flink/taskmanager-service.yaml" - - "uc4-flink/service-monitor.yaml" - - "uc4-flink/jobmanager-service.yaml" - - "uc4-flink/jobmanager-deployment.yaml" - #- "uc4-flink/jobmanager-rest-service.yaml" - loadGenResourceSets: - - configMap: - name: "benchmark-resources-uc4-loadgen" - files: - - "uc4-kstreams/uc4-load-generator-deployment.yaml" - - "uc4-kstreams/uc4-load-generator-service.yaml" + sut: + resources: + - configMap: + name: "benchmark-resources-uc4-flink" + files: + - "flink-configuration-configmap.yaml" + - "taskmanager-deployment.yaml" + - "taskmanager-service.yaml" + - "service-monitor.yaml" + - "jobmanager-service.yaml" + - "jobmanager-deployment.yaml" + #- "jobmanager-rest-service.yaml" + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc4-loadgen" + files: + - "uc4-load-generator-deployment.yaml" + - "uc4-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-operator.yaml index 828ab9321b85b6c186a89f54586c312bace0fd53..8cb5638828d545a751f22ce94a52ff8bb6ab7e86 100644 --- a/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-operator.yaml @@ -3,20 +3,22 @@ kind: benchmark metadata: name: uc4-kstreams spec: - appResourceSets: - - configMap: - name: "benchmark-resources-uc4-kstreams" - files: - - "uc4-kstreams/uc4-kstreams-deployment.yaml" - - "uc4-kstreams/uc4-kstreams-service.yaml" - - "uc4-kstreams/uc4-jmx-configmap.yaml" - - "uc4-kstreams/uc4-service-monitor.yaml" - loadGenResourceSets: - - configMap: - name: "benchmark-resources-uc4-loadgen" - files: - - "uc4-kstreams/uc4-load-generator-deployment.yaml" - - "uc4-kstreams/uc4-load-generator-service.yaml" + sut: + resources: + - configMap: + name: "benchmark-resources-uc4-kstreams" + files: + - "uc4-kstreams-deployment.yaml" + - "uc4-kstreams-service.yaml" + - "uc4-jmx-configmap.yaml" + - "uc4-service-monitor.yaml" + loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc4-loadgen" + files: + - "uc4-load-generator-deployment.yaml" + - "uc4-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-standalone.yaml b/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-standalone.yaml index ab112cdcb1adcc1cb8a1a4fd455af5d4aec888a2..39e65f36d4dbff84f1ae1bab3b76a5c912f4a7d6 100644 --- a/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-standalone.yaml +++ b/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-standalone.yaml @@ -1,18 +1,20 @@ name: "uc4-kstreams" -appResourceSets: - - configMap: - name: "benchmark-resources-uc4-kstreams" - files: - - "uc4-kstreams/uc4-kstreams-deployment.yaml" - - "uc4-kstreams/uc4-kstreams-service.yaml" - - "uc4-kstreams/uc4-jmx-configmap.yaml" - - "uc4-kstreams/uc4-service-monitor.yaml" -loadGenResourceSets: - - configMap: - name: "benchmark-resources-uc4-loadgen" - files: - - "uc4-kstreams/uc4-load-generator-deployment.yaml" - - "uc4-kstreams/uc4-load-generator-service.yaml" +sut: + resources: + - configMap: + name: "benchmark-resources-uc4-kstreams" + files: + - "uc4-kstreams-deployment.yaml" + - "uc4-kstreams-service.yaml" + - "uc4-jmx-configmap.yaml" + - "uc4-service-monitor.yaml" +loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc4-loadgen" + files: + - "uc4-load-generator-deployment.yaml" + - "uc4-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite/crd/crd-benchmark.yaml b/theodolite/crd/crd-benchmark.yaml index 4425763ba4f6d4fd560151f4bd0910f05d50da1f..befab6f98c2d376218de49bf88e5a037ec13d525 100644 --- a/theodolite/crd/crd-benchmark.yaml +++ b/theodolite/crd/crd-benchmark.yaml @@ -20,11 +20,123 @@ spec: properties: spec: type: object - required: ["appResourceSets", "loadGenResourceSets", "resourceTypes", "loadTypes", "kafkaConfig"] + required: ["sut", "loadGenerator", "resourceTypes", "loadTypes", "kafkaConfig"] properties: name: description: This field exists only for technical reasons and should not be set by the user. The value of the field will be overwritten. type: string + infrastructure: + description: (Optional) A list of file names that reference Kubernetes resources that are deployed on the cluster to create the required infrastructure. + type: object + default: {} + properties: + resources: + type: array + default: [] + items: + type: object + oneOf: + - required: [ configMap ] + - required: [ fileSystem ] + properties: + configMap: + description: The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap. + type: object + properties: + name: + description: The name of the configMap + type: string + files: + description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. + type: array + items: + type: string + fileSystem: + description: The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. + type: object + properties: + path: + description: The path to the folder which contains the Kubernetes manifests files. + type: string + files: + description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. + type: array + items: + type: string + sut: + description: The appResourceSets specifies all Kubernetes resources required to start the sut. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet. + type: object + properties: + resources: + type: array + default: [ ] + items: + type: object + oneOf: + - required: [ configMap ] + - required: [ fileSystem ] + properties: + configMap: + description: The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap. + type: object + properties: + name: + description: The name of the configMap + type: string + files: + description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. + type: array + items: + type: string + fileSystem: + description: The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. + type: object + properties: + path: + description: The path to the folder which contains the Kubernetes manifests files. + type: string + files: + description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. + type: array + items: + type: string + loadGenerator: + description: The loadGenResourceSets specifies all Kubernetes resources required to start the load generator. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet. + type: object + properties: + resources: + type: array + default: [] + items: + type: object + oneOf: + - required: [ configMap ] + - required: [ fileSystem ] + properties: + configMap: + description: The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap. + type: object + properties: + name: + description: The name of the configMap + type: string + files: + description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. + type: array + items: + type: string + fileSystem: + description: The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. + type: object + properties: + path: + description: The path to the folder which contains the Kubernetes manifests files. + type: string + files: + description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. + type: array + items: + type: string resourceTypes: description: A list of resource types that can be scaled for this `benchmark` resource. For each resource type the concrete values are defined in the `execution` object. type: array @@ -123,72 +235,6 @@ spec: description: Determines if this topic should only be deleted after each experiement. For removeOnly topics the name can be a RegEx describing the topic. type: boolean default: false - appResourceSets: - description: The appResourceSets specifies all Kubernetes resources required to start the sut. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet. - type: array - items: - type: object - oneOf: - - required: [configMap] - - required: [fileSystem] - properties: - configMap: - description: The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap. - type: object - properties: - name: - description: The name of the configMap - type: string - files: - description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. - type: array - items: - type: string - fileSystem: - description: The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. - type: object - properties: - path: - description: The path to the folder which contains the Kubernetes manifests files. - type: string - files: - description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. - type: array - items: - type: string - loadGenResourceSets: - description: The loadGenResourceSets specifies all Kubernetes resources required to start the load generator. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet. - type: array - items: - type: object - oneOf: - - required: [configMap] - - required: [fileSystem] - properties: - configMap: - description: The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap. - type: object - properties: - name: - description: The name of the configMap - type: string - files: - description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. - type: array - items: - type: string - fileSystem: - description: The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. - type: object - properties: - path: - description: The path to the folder which contains the Kubernetes manifests files. - type: string - files: - description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. - type: array - items: - type: string additionalPrinterColumns: - name: Age type: date diff --git a/theodolite/examples/operator/example-benchmark.yaml b/theodolite/examples/operator/example-benchmark.yaml index c10c01bd87937a7741199c3e1d0ddb497ce2a036..3452fff9c729d680890d6eafa685ce2f13b098d6 100644 --- a/theodolite/examples/operator/example-benchmark.yaml +++ b/theodolite/examples/operator/example-benchmark.yaml @@ -3,17 +3,19 @@ kind: benchmark metadata: name: uc1-kstreams spec: - appResourceSets: - - configMap: - name: "example-configmap" - files: - - "uc1-kstreams-deployment.yaml" - loadGenResourceSets: - - configMap: - name: "example-configmap" - files: - - uc1-load-generator-service.yaml - - uc1-load-generator-deployment.yaml + sut: + resources: + - configMap: + name: "example-configmap" + files: + - "uc1-kstreams-deployment.yaml" + loadGenerator: + resources: + - configMap: + name: "example-configmap" + files: + - uc1-load-generator-service.yaml + - uc1-load-generator-deployment.yaml resourceTypes: - typeName: "Instances" patchers: @@ -38,27 +40,4 @@ spec: numPartitions: 40 replicationFactor: 1 - name: "theodolite-.*" - removeOnly: True - appResourceSets: - # - fileSystem: - # path: ./../../../../../../config - # files: - # - "uc1-kstreams-deployment.yaml" - # - "aggregation-service.yaml" - # - "jmx-configmap.yaml" - # - "uc1-service-monitor.yaml" - - configMap: - name: "example-configmap" - files: - - "uc1-kstreams-deployment.yaml" - loadGenResourceSets: - # - fileSystem: - # path: ./../../../../../../config - # files: - # - uc1-load-generator-service.yaml - # - uc1-load-generator-deployment.yaml - - configMap: - name: "example-configmap" - files: - - uc1-load-generator-service.yaml - - uc1-load-generator-deployment.yaml + removeOnly: True \ No newline at end of file diff --git a/theodolite/examples/standalone/example-benchmark.yaml b/theodolite/examples/standalone/example-benchmark.yaml index 9c00dd0fde10e7fb2a9424a243bdbf4d0ba86980..0d5df81b163c1285f12971d08518dddf4b451d0f 100644 --- a/theodolite/examples/standalone/example-benchmark.yaml +++ b/theodolite/examples/standalone/example-benchmark.yaml @@ -1,15 +1,18 @@ name: "uc1-kstreams" -appResourceSets: - - configMap: - name: "example-configmap" - files: - - "uc1-kstreams-deployment.yaml" -loadGenResourceSets: - - configMap: - name: "example-configmap" - files: - - uc1-load-generator-service.yaml - - uc1-load-generator-deployment.yaml + infrastructure: [] + sut: + resources: + - configMap: + name: "example-configmap" + files: + - "uc1-kstreams-deployment.yaml" + loadGenerator: + resources: + - configMap: + name: "example-configmap" + files: + - uc1-load-generator-service.yaml + - uc1-load-generator-deployment.yaml resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/Benchmark.kt b/theodolite/src/main/kotlin/theodolite/benchmark/Benchmark.kt index 05d021b1bcfb77fa8ffeb0522510d49e39ef501c..cf2fac7337d79c1c5daf2b0fac070200cf27f9a5 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/Benchmark.kt +++ b/theodolite/src/main/kotlin/theodolite/benchmark/Benchmark.kt @@ -14,6 +14,9 @@ import theodolite.util.Resource @RegisterForReflection interface Benchmark { + fun setupInfrastructure() + fun teardownInfrastructure() + /** * Builds a Deployment that can be deployed. * @return a BenchmarkDeployment. diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/BenchmarkDeployment.kt b/theodolite/src/main/kotlin/theodolite/benchmark/BenchmarkDeployment.kt index 92d3f7a012517895fc61531026e4ea4f3e3cfb50..fd01ecd986775ef704949743fef0d19f5492e9a6 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/BenchmarkDeployment.kt +++ b/theodolite/src/main/kotlin/theodolite/benchmark/BenchmarkDeployment.kt @@ -7,8 +7,7 @@ package theodolite.benchmark interface BenchmarkDeployment { /** - * Setup a benchmark. This method is responsible for deploying the resources - * and organize the needed infrastructure. + * Setup a benchmark. This method is responsible for deploying the resources of a benchmark. */ fun setup() diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt b/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt index cbdaab0d3158990ceff781045134638e8782989f..5b6f956ec236ac8113a426dc22d0d08a968ca7b9 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt +++ b/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt @@ -3,8 +3,10 @@ package theodolite.benchmark import com.fasterxml.jackson.databind.annotation.JsonDeserialize import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.client.DefaultKubernetesClient +import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.quarkus.runtime.annotations.RegisterForReflection import mu.KotlinLogging +import theodolite.k8s.K8sManager import theodolite.k8s.resourceLoader.K8sResourceLoader import theodolite.patcher.PatcherFactory import theodolite.util.* @@ -38,19 +40,37 @@ class KubernetesBenchmark : KubernetesResource, Benchmark { lateinit var resourceTypes: List<TypeName> lateinit var loadTypes: List<TypeName> lateinit var kafkaConfig: KafkaConfig - lateinit var appResourceSets: List<ResourceSets> - lateinit var loadGenResourceSets: List<ResourceSets> + lateinit var infrastructure: Resources + lateinit var sut: Resources + lateinit var loadGenerator: Resources var namespace = System.getenv("NAMESPACE") ?: DEFAULT_NAMESPACE + @Transient + private val client: NamespacedKubernetesClient = DefaultKubernetesClient().inNamespace(namespace) + /** * Loads [KubernetesResource]s. * It first loads them via the [YamlParserFromFile] to check for their concrete type and afterwards initializes them using * the [K8sResourceLoader] */ fun loadKubernetesResources(resourceSet: List<ResourceSets>): Collection<Pair<String, KubernetesResource>> { - return resourceSet.flatMap { it.loadResourceSet(DefaultKubernetesClient().inNamespace(namespace)) } + return resourceSet.flatMap { it.loadResourceSet(this.client) } + } + + override fun setupInfrastructure() { + val kubernetesManager = K8sManager(this.client) + loadKubernetesResources(this.infrastructure.resources) + .map{it.second} + .forEach { kubernetesManager.deploy(it) } } + override fun teardownInfrastructure() { + val kubernetesManager = K8sManager(this.client) + loadKubernetesResources(this.infrastructure.resources) + .map{it.second} + .forEach { kubernetesManager.remove(it) } + } + /** * Builds a deployment. * First loads all required resources and then patches them to the concrete load and resources for the experiment. @@ -69,8 +89,8 @@ class KubernetesBenchmark : KubernetesResource, Benchmark { ): BenchmarkDeployment { logger.info { "Using $namespace as namespace." } - val appResources = loadKubernetesResources(this.appResourceSets) - val loadGenResources = loadKubernetesResources(this.loadGenResourceSets) + val appResources = loadKubernetesResources(this.sut.resources) + val loadGenResources = loadKubernetesResources(this.loadGenerator.resources) val patcherFactory = PatcherFactory() @@ -95,7 +115,7 @@ class KubernetesBenchmark : KubernetesResource, Benchmark { afterTeardownDelay = afterTeardownDelay, kafkaConfig = hashMapOf("bootstrap.servers" to kafkaConfig.bootstrapServer), topics = kafkaConfig.topics, - client = DefaultKubernetesClient().inNamespace(namespace) + client = this.client ) } } diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/Resources.kt b/theodolite/src/main/kotlin/theodolite/benchmark/Resources.kt new file mode 100644 index 0000000000000000000000000000000000000000..0187735b8fd273419874942cb7ed68797732c84c --- /dev/null +++ b/theodolite/src/main/kotlin/theodolite/benchmark/Resources.kt @@ -0,0 +1,13 @@ +package theodolite.benchmark + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize +import com.fasterxml.jackson.databind.annotation.JsonSerialize +import io.quarkus.runtime.annotations.RegisterForReflection + +@JsonDeserialize +@RegisterForReflection +class Resources { + + lateinit var resources: List<ResourceSets> + +} \ No newline at end of file diff --git a/theodolite/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt b/theodolite/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt index a5a4904f8ea8de152932333a1b8302f9539e260b..315d1cf1afe7fd2ffbfc1c437d725d4dff29f637 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt +++ b/theodolite/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt @@ -113,6 +113,8 @@ class TheodoliteExecutor( * execution and benchmark objects. */ fun run() { + kubernetesBenchmark.setupInfrastructure() + val ioHandler = IOHandler() val resultsFolder = ioHandler.getResultFolderURL() this.config.executionId = getAndIncrementExecutionID(resultsFolder + "expID.txt") @@ -136,6 +138,7 @@ class TheodoliteExecutor( "${resultsFolder}exp${this.config.executionId}-result" ) } + kubernetesBenchmark.teardownInfrastructure() } private fun getAndIncrementExecutionID(fileURL: String): Int { diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt b/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt index 9058f1f314be9e71e882dff789e914bc4085c6f2..14d13160909817dc43d118173bf3ceee9bb47520 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt +++ b/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt @@ -5,11 +5,9 @@ import io.fabric8.kubernetes.client.dsl.Resource import mu.KotlinLogging import theodolite.benchmark.BenchmarkExecution import theodolite.benchmark.KubernetesBenchmark -import theodolite.execution.ExecutionModes import theodolite.execution.TheodoliteExecutor import theodolite.model.crd.* import theodolite.patcher.ConfigOverrideModifier -import theodolite.util.ExecutionFailedException import theodolite.util.ExecutionStateComparator import java.lang.Thread.sleep @@ -70,8 +68,8 @@ class TheodoliteController( try { val modifier = ConfigOverrideModifier( execution = execution, - resources = benchmark.loadKubernetesResources(benchmark.appResourceSets).map { it.first } - + benchmark.loadKubernetesResources(benchmark.loadGenResourceSets).map { it.first } + resources = benchmark.loadKubernetesResources(benchmark.sut.resources).map { it.first } + + benchmark.loadKubernetesResources(benchmark.loadGenerator.resources).map { it.first } ) modifier.setAdditionalLabels( labelValue = execution.name, diff --git a/theodolite/src/test/kotlin/theodolite/TestBenchmark.kt b/theodolite/src/test/kotlin/theodolite/TestBenchmark.kt index 913a27a1b1c1412aa0a58baf9e11fafb1c7f4bd2..b08c1a18a3013e1573e4892f01698b5e509f9609 100644 --- a/theodolite/src/test/kotlin/theodolite/TestBenchmark.kt +++ b/theodolite/src/test/kotlin/theodolite/TestBenchmark.kt @@ -8,6 +8,12 @@ import theodolite.util.Resource class TestBenchmark : Benchmark { + override fun setupInfrastructure() { + } + + override fun teardownInfrastructure() { + } + override fun buildDeployment( load: LoadDimension, res: Resource, diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt b/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt index 24192282a7407daf60390660a5858e15640207f3..e294ea539ea60104cc00e9f73de790302ad52670 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt +++ b/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt @@ -1,6 +1,7 @@ package theodolite.execution.operator import theodolite.benchmark.KubernetesBenchmark +import theodolite.benchmark.Resources import theodolite.model.crd.BenchmarkCRD import theodolite.util.KafkaConfig @@ -24,8 +25,14 @@ class BenchmarkCRDummy(name: String) { benchmarkCR.kind = "Benchmark" benchmarkCR.apiVersion = "v1" - benchmark.appResourceSets = emptyList() - benchmark.loadGenResourceSets = emptyList() + + benchmark.infrastructure = Resources() + benchmark.sut = Resources() + benchmark.loadGenerator = Resources() + + benchmark.infrastructure.resources = emptyList() + benchmark.sut.resources = emptyList() + benchmark.loadGenerator.resources = emptyList() benchmark.resourceTypes = emptyList() benchmark.loadTypes = emptyList()