diff --git a/docs/crd-docu.md b/docs/crd-docu.md index 03b87f5476f096e41ee76cb0ebcb1fc75f3870e3..f97164a29d7b2c86286265f3047b4216c3c3da74 100644 --- a/docs/crd-docu.md +++ b/docs/crd-docu.md @@ -79,13 +79,6 @@ Resource Types: </tr> </thead> <tbody><tr> - <td><b><a href="#benchmarkspecinfrastructureindex">infrastructure</a></b></td> - <td>[]object</td> - <td> - A list of file names that reference Kubernetes resources that are deployed on the cluster to create the required infrastructure.<br/> - </td> - <td>false</td> - </tr><tr> <td><b>name</b></td> <td>string</td> <td> @@ -93,10 +86,10 @@ Resource Types: </td> <td>false</td> </tr><tr> - <td><b><a href="#benchmarkspecappresourcesetsindex">appResourceSets</a></b></td> + <td><b><a href="#benchmarkspecinfrastructureindex">infrastructure</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/> + A list of file names that reference Kubernetes resources that are deployed on the cluster to create the required infrastructure.<br/> </td> <td>true</td> </tr><tr> @@ -107,7 +100,7 @@ Resource Types: </td> <td>true</td> </tr><tr> - <td><b><a href="#benchmarkspecloadgenresourcesetsindex">loadGenResourceSets</a></b></td> + <td><b><a href="#benchmarkspecloadgeneratorindex">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/> @@ -127,6 +120,13 @@ 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="#benchmarkspecsutindex">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> @@ -204,108 +204,6 @@ The configMap resourceSet loads the Kubernetes manifests from an Kubernetes conf -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> - - -### benchmark.spec.appResourceSets[index] -<sup><sup>[↩ Parent](#benchmarkspec)</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="#benchmarkspecappresourcesetsindexconfigmap">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>object</td> - <td> - The fileSystem resourceSet loads the Kubernetes manifests from the filesystem.<br/> - </td> - <td>false</td> - </tr></tbody> -</table> - - -### benchmark.spec.appResourceSets[index].configMap -<sup><sup>[↩ Parent](#benchmarkspecappresourcesetsindex)</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.appResourceSets[index].fileSystem -<sup><sup>[↩ Parent](#benchmarkspecappresourcesetsindex)</sup></sup> - - - The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. <table> @@ -425,7 +323,7 @@ Contains the Kafka configuration. </table> -### benchmark.spec.loadGenResourceSets[index] +### benchmark.spec.loadGenerator[index] <sup><sup>[↩ Parent](#benchmarkspec)</sup></sup> @@ -442,14 +340,14 @@ Contains the Kafka configuration. </tr> </thead> <tbody><tr> - <td><b><a href="#benchmarkspecloadgenresourcesetsindexconfigmap">configMap</a></b></td> + <td><b><a href="#benchmarkspecloadgeneratorindexconfigmap">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="#benchmarkspecloadgeneratorindexfilesystem">fileSystem</a></b></td> <td>object</td> <td> The fileSystem resourceSet loads the Kubernetes manifests from the filesystem.<br/> @@ -459,8 +357,8 @@ Contains the Kafka configuration. </table> -### benchmark.spec.loadGenResourceSets[index].configMap -<sup><sup>[↩ Parent](#benchmarkspecloadgenresourcesetsindex)</sup></sup> +### benchmark.spec.loadGenerator[index].configMap +<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorindex)</sup></sup> @@ -493,8 +391,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[index].fileSystem +<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorindex)</sup></sup> @@ -688,6 +586,108 @@ The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. </tr></tbody> </table> + +### benchmark.spec.sut[index] +<sup><sup>[↩ Parent](#benchmarkspec)</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="#benchmarkspecsutindexconfigmap">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="#benchmarkspecsutindexfilesystem">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[index].configMap +<sup><sup>[↩ Parent](#benchmarkspecsutindex)</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[index].fileSystem +<sup><sup>[↩ Parent](#benchmarkspecsutindex)</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..33c120371155134dae73ff78b42869ab64fdd0fe 100644 --- a/theodolite-benchmarks/definitions/uc1-flink/uc1-flink-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc1-flink/uc1-flink-benchmark-operator.yaml @@ -3,7 +3,8 @@ kind: benchmark metadata: name: uc1-flink spec: - appResourceSets: + infrastructure: [] + sut: - configMap: name: "benchmark-resources-uc1-flink" files: @@ -14,7 +15,7 @@ spec: - "uc1-flink/jobmanager-service.yaml" - "uc1-flink/jobmanager-deployment.yaml" #- "uc1-flink/jobmanager-rest-service.yaml" - loadGenResourceSets: + loadGenerator: - configMap: name: "benchmark-resources-uc1-loadgen" files: diff --git a/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-operator.yaml index 283b3baa53b2090b445a379641086f2dc6c7753e..8dade1e1db560106b3617e649c1163084cee468c 100644 --- a/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-operator.yaml @@ -3,7 +3,8 @@ kind: benchmark metadata: name: uc1-kstreams spec: - appResourceSets: + infrastructure: [] + sut: - configMap: name: "benchmark-resources-uc1-kstreams" files: @@ -11,7 +12,7 @@ spec: - "uc1-kstreams/uc1-kstreams-service.yaml" - "uc1-kstreams/uc1-jmx-configmap.yaml" - "uc1-kstreams/uc1-service-monitor.yaml" - loadGenResourceSets: + loadGenerator: - configMap: name: "benchmark-resources-uc1-loadgen" files: diff --git a/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-standalone.yaml b/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-standalone.yaml index b90edf5e4dcae0a4f338fb5edb90c73f34b3d14b..0b04e69f6937567b0c6f05178c29b6fd6b9140a1 100644 --- a/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-standalone.yaml +++ b/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-standalone.yaml @@ -1,4 +1,5 @@ name: "uc1-kstreams" +infrastructure: [] appResourceSet: - configMap: name: "benchmark-resources-uc1-kstreams" 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..6990538013cc5fd4f1c1fbf92098c73d544a05c7 100644 --- a/theodolite-benchmarks/definitions/uc2-flink/uc2-flink-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc2-flink/uc2-flink-benchmark-operator.yaml @@ -3,7 +3,8 @@ kind: benchmark metadata: name: uc2-flink spec: - appResourceSets: + infrastructure: [] + sut: - configMap: name: "benchmark-resources-uc2-flink" files: @@ -14,7 +15,7 @@ spec: - "uc2-flink/jobmanager-service.yaml" - "uc2-flink/jobmanager-deployment.yaml" #- "uc2-flink/jobmanager-rest-service.yaml" - loadGenResourceSets: + loadGenerator: - configMap: name: "benchmark-resources-uc2-loadgen" files: diff --git a/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-operator.yaml index aaf479ae89329cabb1180925bb8984b25f40aa48..b97902c075ef88139533c18469c86fc77b6ef4ba 100644 --- a/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-operator.yaml @@ -3,7 +3,8 @@ kind: benchmark metadata: name: uc2-kstreams spec: - appResourceSets: + infrastructure: [] + sut: - configMap: name: "benchmark-resources-uc2-kstreams" files: @@ -11,7 +12,7 @@ spec: - "uc2-kstreams/uc2-kstreams-service.yaml" - "uc2-kstreams/uc2-jmx-configmap.yaml" - "uc2-kstreams/uc2-service-monitor.yaml" - loadGenResourceSets: + loadGenerator: - configMap: name: "benchmark-resources-uc2-loadgen" files: diff --git a/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-standalone.yaml b/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-standalone.yaml index b0dbd6bf26b1751add491836a76580e5ce980611..9306b8839da2a80e9aad9bbb24dcfdbf70e56f0b 100644 --- a/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-standalone.yaml +++ b/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-standalone.yaml @@ -1,5 +1,6 @@ name: "uc2-kstreams" -appResourceSets: +infrastructure: [] +sut: - configMap: name: "benchmark-resources-uc2-kstreams" files: @@ -7,7 +8,7 @@ appResourceSets: - "uc2-kstreams/uc2-kstreams-service.yaml" - "uc2-kstreams/uc2-jmx-configmap.yaml" - "uc2-kstreams/uc2-service-monitor.yaml" -loadGenResourceSets: +loadGenerator: - configMap: name: "benchmark-resources-uc2-loadgen" files: diff --git a/theodolite-benchmarks/definitions/uc3-flink/test-exec.yaml b/theodolite-benchmarks/definitions/uc3-flink/test-exec.yaml new file mode 100644 index 0000000000000000000000000000000000000000..48151dc3c3ba473a6725e1dfceb8b67f60f6f890 --- /dev/null +++ b/theodolite-benchmarks/definitions/uc3-flink/test-exec.yaml @@ -0,0 +1,56 @@ +apiVersion: theodolite.com/v1 +kind: execution +metadata: + name: uc3-flink-template +spec: + benchmark: "uc3-flink" + load: + loadType: "NumSensors" + loadValues: [100] + resources: + resourceType: "Instances" + resourceValues: [1] + slos: + - sloType: "lag trend percent" + prometheusUrl: "http://prometheus-operated:9090" + offset: 0 + properties: + percent: 0.05 + externalSloUrl: "http://localhost:80/evaluate-slope" + warmup: 60 # in seconds + execution: + strategy: "LinearSearch" + duration: 300 # in seconds + repetitions: 1 + loadGenerationDelay: 30 # in seconds + restrictions: + - "LowerBound" + configOverrides: + - patcher: + type: "ResourceLimitPatcher" + resource: "uc3-flink/jobmanager-deployment.yaml" + properties: + container: "jobmanager" + limitedResource: "cpu" + value: "200m" + - patcher: + type: "ResourceLimitPatcher" + resource: "uc3-flink/jobmanager-deployment.yaml" + properties: + container: "jobmanager" + limitedResource: "memory" + value: "1Gi" + - patcher: + type: "ResourceLimitPatcher" + resource: "uc3-flink/taskmanager-deployment.yaml" + properties: + container: "taskmanager" + limitedResource: "cpu" + value: "200m" + - patcher: + type: "ResourceLimitPatcher" + resource: "uc3-flink/taskmanager-deployment.yaml" + properties: + container: "taskmanager" + limitedResource: "memory" + value: "1Gi" \ No newline at end of file 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..af126fe8b2a203481213be617aa9e20dd59eea1f 100644 --- a/theodolite-benchmarks/definitions/uc3-flink/uc3-flink-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc3-flink/uc3-flink-benchmark-operator.yaml @@ -3,7 +3,8 @@ kind: benchmark metadata: name: uc3-flink spec: - appResourceSets: + infrastructure: [] + sut: - configMap: name: "benchmark-resources-uc3-flink" files: @@ -14,7 +15,7 @@ spec: - "uc3-flink/jobmanager-service.yaml" - "uc3-flink/jobmanager-deployment.yaml" #- "uc3-flink/jobmanager-rest-service.yaml" - loadGenResourceSets: + loadGenerator: - configMap: name: "benchmark-resources-uc3-loadgen" files: diff --git a/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-operator.yaml index ef49aac8bcfbe5d3798982689fc73b540d0aade7..d51cc9a94ad814622862c5d6630de3b05eda9ad9 100644 --- a/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-operator.yaml @@ -3,7 +3,8 @@ kind: benchmark metadata: name: uc3-kstreams spec: - appResourceSets: + infrastructure: [] + sut: - configMap: name: "benchmark-resources-uc3-kstreams" files: @@ -11,7 +12,7 @@ spec: - "uc3-kstreams/uc3-kstreams-service.yaml" - "uc3-kstreams/uc3-jmx-configmap.yaml" - "uc3-kstreams/uc3-service-monitor.yaml" - loadGenResourceSets: + loadGenerator: - configMap: name: "benchmark-resources-uc3-loadgen" files: diff --git a/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-standalone.yaml b/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-standalone.yaml index 8bb0b6733bc474d224def09cf22b0315c050b5dd..13c499d63b902c93091b48608a020003f52ae6fc 100644 --- a/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-standalone.yaml +++ b/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-standalone.yaml @@ -1,5 +1,6 @@ name: "uc3-kstreams" -appResourceSets: +infrastructure: [] +sut: - configMap: name: "benchmark-resources-uc3-kstreams" files: @@ -7,7 +8,7 @@ appResourceSets: - "uc3-kstreams/uc3-kstreams-service.yaml" - "uc3-kstreams/uc3-jmx-configmap.yaml" - "uc3-kstreams/uc3-service-monitor.yaml" -loadGenResourceSets: +loadGenerator: - configMap: name: "benchmark-resources-uc3-loadgen" files: 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..dd99cfebca451326dc5757206ffaf7ae1dd3c017 100644 --- a/theodolite-benchmarks/definitions/uc4-flink/uc4-flink-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc4-flink/uc4-flink-benchmark-operator.yaml @@ -3,7 +3,8 @@ kind: benchmark metadata: name: uc4-flink spec: - appResourceSets: + infrastructure: [] + sut: - configMap: name: "benchmark-resources-uc4-flink" files: @@ -14,7 +15,7 @@ spec: - "uc4-flink/jobmanager-service.yaml" - "uc4-flink/jobmanager-deployment.yaml" #- "uc4-flink/jobmanager-rest-service.yaml" - loadGenResourceSets: + loadGenerator: - configMap: name: "benchmark-resources-uc4-loadgen" files: diff --git a/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-operator.yaml index 828ab9321b85b6c186a89f54586c312bace0fd53..ab3b5f95f60411225a1e8200aee5a34f728b1c3d 100644 --- a/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-operator.yaml @@ -3,7 +3,8 @@ kind: benchmark metadata: name: uc4-kstreams spec: - appResourceSets: + infrastructure: [] + sut: - configMap: name: "benchmark-resources-uc4-kstreams" files: @@ -11,7 +12,7 @@ spec: - "uc4-kstreams/uc4-kstreams-service.yaml" - "uc4-kstreams/uc4-jmx-configmap.yaml" - "uc4-kstreams/uc4-service-monitor.yaml" - loadGenResourceSets: + loadGenerator: - configMap: name: "benchmark-resources-uc4-loadgen" files: diff --git a/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-standalone.yaml b/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-standalone.yaml index ab112cdcb1adcc1cb8a1a4fd455af5d4aec888a2..76ca678d0d223a0485bac3425905288851b7eefd 100644 --- a/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-standalone.yaml +++ b/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-standalone.yaml @@ -1,5 +1,6 @@ name: "uc4-kstreams" -appResourceSets: +infrastructure: [] +sut: - configMap: name: "benchmark-resources-uc4-kstreams" files: @@ -7,7 +8,7 @@ appResourceSets: - "uc4-kstreams/uc4-kstreams-service.yaml" - "uc4-kstreams/uc4-jmx-configmap.yaml" - "uc4-kstreams/uc4-service-monitor.yaml" -loadGenResourceSets: +loadGenerator: - configMap: name: "benchmark-resources-uc4-loadgen" files: diff --git a/theodolite/crd/crd-benchmark.yaml b/theodolite/crd/crd-benchmark.yaml index c08bb0a5c862754adeb0f6a0aa2ed14dcf1916bd..c5d08e78685e17ad65bd60c12656ea81c9c47e7b 100644 --- a/theodolite/crd/crd-benchmark.yaml +++ b/theodolite/crd/crd-benchmark.yaml @@ -20,11 +20,110 @@ spec: properties: spec: type: object - required: ["appResourceSets", "loadGenResourceSets", "resourceTypes", "loadTypes", "kafkaConfig"] + required: ["infrastructure", "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 + type: string + infrastructure: + description: A list of file names that reference Kubernetes resources that are deployed on the cluster to create the required infrastructure. + 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 + 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: 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 + 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: 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 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,105 +222,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 - infrastructure: - description: A list of file names that reference Kubernetes resources that are deployed on the cluster to create the required infrastructure. - 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 - 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 d28a0e5fdcd85d7335eb240dcc14b10307aa3622..e9c6b2f33e8d8af6f8bcec9cfea68d06168a3d32 100644 --- a/theodolite/examples/operator/example-benchmark.yaml +++ b/theodolite/examples/operator/example-benchmark.yaml @@ -3,6 +3,18 @@ kind: benchmark metadata: name: uc1-kstreams spec: + infrastructure: [] + sut: + - configMap: + name: "example-configmap" + files: + - "uc1-kstreams-deployment.yaml" + loadGenerator: + - configMap: + name: "example-configmap" + files: + - uc1-load-generator-service.yaml + - uc1-load-generator-deployment.yaml resourceTypes: - typeName: "Instances" patchers: @@ -27,32 +39,4 @@ spec: numPartitions: 40 replicationFactor: 1 - name: "theodolite-.*" - removeOnly: True - infrastructure: - - configMap: - name: "example-configmap" - files: - - test-service.yaml - 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/operator/example-configmap.yaml b/theodolite/examples/operator/example-configmap.yaml index 4e12df3c21d30201e959e6bafc1f0d6ff8fbbab9..210ce32d3fc0f75b9ffce874d1fa0a1ea9bdc3cd 100644 --- a/theodolite/examples/operator/example-configmap.yaml +++ b/theodolite/examples/operator/example-configmap.yaml @@ -84,21 +84,4 @@ data: - name: coordination port: 5701 targetPort: 5701 - protocol: TCP - test-service.yaml: | - apiVersion: v1 - kind: Service - metadata: - name: test-service - labels: - app: test-service - spec: - type: ClusterIP - clusterIP: None - selector: - app: test - ports: - - name: coordination - port: 5701 - targetPort: 5701 - protocol: TCP + protocol: TCP \ No newline at end of file diff --git a/theodolite/examples/standalone/example-benchmark.yaml b/theodolite/examples/standalone/example-benchmark.yaml index 9c00dd0fde10e7fb2a9424a243bdbf4d0ba86980..e9ec8fc15006151a9bee837d516419f02e07042b 100644 --- a/theodolite/examples/standalone/example-benchmark.yaml +++ b/theodolite/examples/standalone/example-benchmark.yaml @@ -1,15 +1,16 @@ 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: + - configMap: + name: "example-configmap" + files: + - "uc1-kstreams-deployment.yaml" + loadGenerator: + - 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/KubernetesBenchmark.kt b/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt index 20ea477bc821a430653a99d343cd942532dcf149..b6eb1d149cd46f011fd61be70af6f18786afd2ed 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt +++ b/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt @@ -41,8 +41,8 @@ class KubernetesBenchmark : KubernetesResource, Benchmark { lateinit var loadTypes: List<TypeName> lateinit var kafkaConfig: KafkaConfig lateinit var infrastructure: List<ResourceSets> - lateinit var appResourceSets: List<ResourceSets> - lateinit var loadGenResourceSets: List<ResourceSets> + lateinit var sut: List<ResourceSets> + lateinit var loadGenerator: List<ResourceSets> var namespace = System.getenv("NAMESPACE") ?: DEFAULT_NAMESPACE @Transient @@ -89,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) + val loadGenResources = loadKubernetesResources(this.loadGenerator) val patcherFactory = PatcherFactory() diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt b/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt index 9058f1f314be9e71e882dff789e914bc4085c6f2..4f5430eb6bd9a799774decd33ada3055b2f72ed4 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).map { it.first } + + benchmark.loadKubernetesResources(benchmark.loadGenerator).map { it.first } ) modifier.setAdditionalLabels( labelValue = execution.name, diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt b/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt index dabc42d69d0f08b13d155c68df0dc950cfc87f2f..a5955e83bc29bbe43a839e8df71dffa267449958 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt +++ b/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt @@ -25,8 +25,8 @@ class BenchmarkCRDummy(name: String) { benchmarkCR.apiVersion = "v1" benchmark.infrastructure = emptyList() - benchmark.appResourceSets = emptyList() - benchmark.loadGenResourceSets = emptyList() + benchmark.sut = emptyList() + benchmark.loadGenerator = emptyList() benchmark.resourceTypes = emptyList() benchmark.loadTypes = emptyList()