From 8fb6df67d2436470d44a36ef414e0f54c3b609c0 Mon Sep 17 00:00:00 2001 From: "stu126940@mail.uni-kiel.de" <stu126940@mail.uni-kiel.de> Date: Mon, 10 Jan 2022 11:03:36 +0100 Subject: [PATCH] update crd docs --- docs/crd-docu.md | 1098 +++++++++++++++-- theodolite/crd/crd-benchmark.yaml | 53 + .../benchmark/KubernetesBenchmark.kt | 4 +- 3 files changed, 1030 insertions(+), 125 deletions(-) diff --git a/docs/crd-docu.md b/docs/crd-docu.md index 73d85c951..1d7d9dde6 100644 --- a/docs/crd-docu.md +++ b/docs/crd-docu.md @@ -186,6 +186,24 @@ Resource Types: </tr> </thead> <tbody><tr> + <td><b><a href="#benchmarkspecinfrastructureafteractionsindex">afterActions</a></b></td> + <td>[]object</td> + <td> + Infrastructure after actions are executed after the teardown of the infrastructure.<br/> + <br/> + <i>Default</i>: []<br/> + </td> + <td>false</td> + </tr><tr> + <td><b><a href="#benchmarkspecinfrastructurebeforeactionsindex">beforeActions</a></b></td> + <td>[]object</td> + <td> + Infrastructure before actions are executed before the infrastructure is set up.<br/> + <br/> + <i>Default</i>: []<br/> + </td> + <td>false</td> + </tr><tr> <td><b><a href="#benchmarkspecinfrastructureresourcesindex">resources</a></b></td> <td>[]object</td> <td> @@ -198,7 +216,7 @@ Resource Types: </table> -### benchmark.spec.infrastructure.resources[index] +### benchmark.spec.infrastructure.afterActions[index] <sup><sup>[↩ Parent](#benchmarkspecinfrastructure)</sup></sup> @@ -215,29 +233,29 @@ Resource Types: </tr> </thead> <tbody><tr> - <td><b><a href="#benchmarkspecinfrastructureresourcesindexconfigmap">configMap</a></b></td> + <td><b><a href="#benchmarkspecinfrastructureafteractionsindexexec">exec</a></b></td> <td>object</td> <td> - The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap.<br/> + Specifies command to be executed.<br/> </td> <td>false</td> </tr><tr> - <td><b><a href="#benchmarkspecinfrastructureresourcesindexfilesystem">fileSystem</a></b></td> + <td><b><a href="#benchmarkspecinfrastructureafteractionsindexselector">selector</a></b></td> <td>object</td> <td> - The fileSystem resourceSet loads the Kubernetes manifests from the filesystem.<br/> + The selector specifies which resource should be selected for the execution of the command.<br/> </td> <td>false</td> </tr></tbody> </table> -### benchmark.spec.infrastructure.resources[index].configMap -<sup><sup>[↩ Parent](#benchmarkspecinfrastructureresourcesindex)</sup></sup> +### benchmark.spec.infrastructure.afterActions[index].exec +<sup><sup>[↩ Parent](#benchmarkspecinfrastructureafteractionsindex)</sup></sup> -The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap. +Specifies command to be executed. <table> <thead> @@ -249,29 +267,29 @@ The configMap resourceSet loads the Kubernetes manifests from an Kubernetes conf </tr> </thead> <tbody><tr> - <td><b>files</b></td> + <td><b>command</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/> + The command to be executed as string array.<br/> </td> <td>false</td> </tr><tr> - <td><b>name</b></td> - <td>string</td> + <td><b>timeoutSeconds</b></td> + <td>integer</td> <td> - The name of the configMap<br/> + Specifies the timeout (in seconds) for the specified command.<br/> </td> <td>false</td> </tr></tbody> </table> -### benchmark.spec.infrastructure.resources[index].fileSystem -<sup><sup>[↩ Parent](#benchmarkspecinfrastructureresourcesindex)</sup></sup> +### benchmark.spec.infrastructure.afterActions[index].selector +<sup><sup>[↩ Parent](#benchmarkspecinfrastructureafteractionsindex)</sup></sup> -The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. +The selector specifies which resource should be selected for the execution of the command. <table> <thead> @@ -283,29 +301,31 @@ The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. </tr> </thead> <tbody><tr> - <td><b>files</b></td> - <td>[]string</td> + <td><b>container</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/> + Specifies the container.<br/> + <br/> + <i>Default</i>: <br/> </td> <td>false</td> </tr><tr> - <td><b>path</b></td> - <td>string</td> + <td><b><a href="#benchmarkspecinfrastructureafteractionsindexselectorpod">pod</a></b></td> + <td>object</td> <td> - The path to the folder which contains the Kubernetes manifests files.<br/> + Specifies the pod.<br/> </td> <td>false</td> </tr></tbody> </table> -### benchmark.spec.kafkaConfig -<sup><sup>[↩ Parent](#benchmarkspec)</sup></sup> +### benchmark.spec.infrastructure.afterActions[index].selector.pod +<sup><sup>[↩ Parent](#benchmarkspecinfrastructureafteractionsindexselector)</sup></sup> -Contains the Kafka configuration. +Specifies the pod. <table> <thead> @@ -317,25 +337,20 @@ Contains the Kafka configuration. </tr> </thead> <tbody><tr> - <td><b>bootstrapServer</b></td> - <td>string</td> - <td> - The bootstrap servers connection string.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b><a href="#benchmarkspeckafkaconfigtopicsindex">topics</a></b></td> - <td>[]object</td> + <td><b>matchLabels</b></td> + <td>map[string]string</td> <td> - List of topics to be created for each experiment. Alternative theodolite offers the possibility to remove certain topics after each experiment.<br/> + The matchLabels of the desired pod.<br/> + <br/> + <i>Default</i>: map[]<br/> </td> - <td>true</td> + <td>false</td> </tr></tbody> </table> -### benchmark.spec.kafkaConfig.topics[index] -<sup><sup>[↩ Parent](#benchmarkspeckafkaconfig)</sup></sup> +### benchmark.spec.infrastructure.beforeActions[index] +<sup><sup>[↩ Parent](#benchmarkspecinfrastructure)</sup></sup> @@ -351,51 +366,99 @@ Contains the Kafka configuration. </tr> </thead> <tbody><tr> - <td><b>numPartitions</b></td> - <td>integer</td> + <td><b><a href="#benchmarkspecinfrastructurebeforeactionsindexexec">exec</a></b></td> + <td>object</td> <td> - The number of partitions of the topic.<br/> - <br/> - <i>Default</i>: 0<br/> + Specifies command to be executed.<br/> </td> <td>false</td> </tr><tr> - <td><b>removeOnly</b></td> - <td>boolean</td> + <td><b><a href="#benchmarkspecinfrastructurebeforeactionsindexselector">selector</a></b></td> + <td>object</td> <td> - Determines if this topic should only be deleted after each experiement. For removeOnly topics the name can be a RegEx describing the topic.<br/> - <br/> - <i>Default</i>: false<br/> + The selector specifies which resource should be selected for the execution of the command.<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.infrastructure.beforeActions[index].exec +<sup><sup>[↩ Parent](#benchmarkspecinfrastructurebeforeactionsindex)</sup></sup> + + + +Specifies command to be executed. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>command</b></td> + <td>[]string</td> + <td> + The command to be executed as string array.<br/> </td> <td>false</td> </tr><tr> - <td><b>replicationFactor</b></td> + <td><b>timeoutSeconds</b></td> <td>integer</td> <td> - The replication factor of the topic.<br/> - <br/> - <i>Default</i>: 0<br/> + Specifies the timeout (in seconds) for the specified command.<br/> </td> <td>false</td> - </tr><tr> - <td><b>name</b></td> + </tr></tbody> +</table> + + +### benchmark.spec.infrastructure.beforeActions[index].selector +<sup><sup>[↩ Parent](#benchmarkspecinfrastructurebeforeactionsindex)</sup></sup> + + + +The selector specifies which resource should be selected for the execution of the command. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>container</b></td> <td>string</td> <td> - The name of the topic.<br/> + Specifies the container.<br/> <br/> <i>Default</i>: <br/> </td> - <td>true</td> + <td>false</td> + </tr><tr> + <td><b><a href="#benchmarkspecinfrastructurebeforeactionsindexselectorpod">pod</a></b></td> + <td>object</td> + <td> + Specifies the pod.<br/> + </td> + <td>false</td> </tr></tbody> </table> -### benchmark.spec.loadGenerator -<sup><sup>[↩ Parent](#benchmarkspec)</sup></sup> +### benchmark.spec.infrastructure.beforeActions[index].selector.pod +<sup><sup>[↩ Parent](#benchmarkspecinfrastructurebeforeactionsindexselector)</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. +Specifies the pod. <table> <thead> @@ -407,20 +470,20 @@ The loadGenResourceSets specifies all Kubernetes resources required to start the </tr> </thead> <tbody><tr> - <td><b><a href="#benchmarkspecloadgeneratorresourcesindex">resources</a></b></td> - <td>[]object</td> + <td><b>matchLabels</b></td> + <td>map[string]string</td> <td> + The matchLabels of the desired pod.<br/> <br/> - <br/> - <i>Default</i>: []<br/> + <i>Default</i>: map[]<br/> </td> <td>false</td> </tr></tbody> </table> -### benchmark.spec.loadGenerator.resources[index] -<sup><sup>[↩ Parent](#benchmarkspecloadgenerator)</sup></sup> +### benchmark.spec.infrastructure.resources[index] +<sup><sup>[↩ Parent](#benchmarkspecinfrastructure)</sup></sup> @@ -436,14 +499,14 @@ The loadGenResourceSets specifies all Kubernetes resources required to start the </tr> </thead> <tbody><tr> - <td><b><a href="#benchmarkspecloadgeneratorresourcesindexconfigmap">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="#benchmarkspecloadgeneratorresourcesindexfilesystem">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/> @@ -453,8 +516,8 @@ The loadGenResourceSets specifies all Kubernetes resources required to start the </table> -### benchmark.spec.loadGenerator.resources[index].configMap -<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorresourcesindex)</sup></sup> +### benchmark.spec.infrastructure.resources[index].configMap +<sup><sup>[↩ Parent](#benchmarkspecinfrastructureresourcesindex)</sup></sup> @@ -487,8 +550,8 @@ The configMap resourceSet loads the Kubernetes manifests from an Kubernetes conf </table> -### benchmark.spec.loadGenerator.resources[index].fileSystem -<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorresourcesindex)</sup></sup> +### benchmark.spec.infrastructure.resources[index].fileSystem +<sup><sup>[↩ Parent](#benchmarkspecinfrastructureresourcesindex)</sup></sup> @@ -521,12 +584,12 @@ The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. </table> -### benchmark.spec.loadTypes[index] +### benchmark.spec.kafkaConfig <sup><sup>[↩ Parent](#benchmarkspec)</sup></sup> - +Contains the Kafka configuration. <table> <thead> @@ -538,25 +601,25 @@ The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. </tr> </thead> <tbody><tr> - <td><b><a href="#benchmarkspecloadtypesindexpatchersindex">patchers</a></b></td> - <td>[]object</td> + <td><b>bootstrapServer</b></td> + <td>string</td> <td> - List of patchers used to scale this resource type.<br/> + The bootstrap servers connection string.<br/> </td> <td>true</td> </tr><tr> - <td><b>typeName</b></td> - <td>string</td> + <td><b><a href="#benchmarkspeckafkaconfigtopicsindex">topics</a></b></td> + <td>[]object</td> <td> - Name of the load type.<br/> + List of topics to be created for each experiment. Alternative theodolite offers the possibility to remove certain topics after each experiment.<br/> </td> <td>true</td> </tr></tbody> </table> -### benchmark.spec.loadTypes[index].patchers[index] -<sup><sup>[↩ Parent](#benchmarkspecloadtypesindex)</sup></sup> +### benchmark.spec.kafkaConfig.topics[index] +<sup><sup>[↩ Parent](#benchmarkspeckafkaconfig)</sup></sup> @@ -572,28 +635,37 @@ The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. </tr> </thead> <tbody><tr> - <td><b>properties</b></td> - <td>map[string]string</td> + <td><b>numPartitions</b></td> + <td>integer</td> <td> - (Optional) Patcher specific additional arguments.<br/> + The number of partitions of the topic.<br/> <br/> - <i>Default</i>: map[]<br/> + <i>Default</i>: 0<br/> </td> <td>false</td> </tr><tr> - <td><b>resource</b></td> - <td>string</td> + <td><b>removeOnly</b></td> + <td>boolean</td> <td> - Specifies the Kubernetes resource to be patched.<br/> + Determines if this topic should only be deleted after each experiement. For removeOnly topics the name can be a RegEx describing the topic.<br/> <br/> - <i>Default</i>: <br/> + <i>Default</i>: false<br/> </td> - <td>true</td> + <td>false</td> </tr><tr> - <td><b>type</b></td> + <td><b>replicationFactor</b></td> + <td>integer</td> + <td> + The replication factor of the topic.<br/> + <br/> + <i>Default</i>: 0<br/> + </td> + <td>false</td> + </tr><tr> + <td><b>name</b></td> <td>string</td> <td> - Type of the Patcher.<br/> + The name of the topic.<br/> <br/> <i>Default</i>: <br/> </td> @@ -602,12 +674,12 @@ The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. </table> -### benchmark.spec.resourceTypes[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> @@ -619,25 +691,38 @@ The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. </tr> </thead> <tbody><tr> - <td><b><a href="#benchmarkspecresourcetypesindexpatchersindex">patchers</a></b></td> + <td><b><a href="#benchmarkspecloadgeneratorafteractionsindex">afterActions</a></b></td> <td>[]object</td> <td> - List of patchers used to scale this resource type.<br/> + Load generator after actions are executed after the teardown of the load generator.<br/> + <br/> + <i>Default</i>: []<br/> </td> - <td>true</td> + <td>false</td> </tr><tr> - <td><b>typeName</b></td> - <td>string</td> + <td><b><a href="#benchmarkspecloadgeneratorbeforeactionsindex">beforeActions</a></b></td> + <td>[]object</td> <td> - Name of the resource type.<br/> + Load generator before actions are executed before the load generator is started.<br/> + <br/> + <i>Default</i>: []<br/> </td> - <td>true</td> + <td>false</td> + </tr><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.resourceTypes[index].patchers[index] -<sup><sup>[↩ Parent](#benchmarkspecresourcetypesindex)</sup></sup> +### benchmark.spec.loadGenerator.afterActions[index] +<sup><sup>[↩ Parent](#benchmarkspecloadgenerator)</sup></sup> @@ -653,32 +738,515 @@ The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. </tr> </thead> <tbody><tr> - <td><b>properties</b></td> - <td>map[string]string</td> + <td><b><a href="#benchmarkspecloadgeneratorafteractionsindexexec">exec</a></b></td> + <td>object</td> <td> - (Optional) Patcher specific additional arguments.<br/> - <br/> - <i>Default</i>: map[]<br/> + Specifies command to be executed.<br/> </td> <td>false</td> </tr><tr> - <td><b>resource</b></td> - <td>string</td> - <td> - Specifies the Kubernetes resource to be patched.<br/> - <br/> - <i>Default</i>: <br/> - </td> - <td>true</td> - </tr><tr> - <td><b>type</b></td> - <td>string</td> + <td><b><a href="#benchmarkspecloadgeneratorafteractionsindexselector">selector</a></b></td> + <td>object</td> <td> - Type of the patcher.<br/> - <br/> - <i>Default</i>: <br/> + The selector specifies which resource should be selected for the execution of the command.<br/> </td> - <td>true</td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.loadGenerator.afterActions[index].exec +<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorafteractionsindex)</sup></sup> + + + +Specifies command to be executed. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>command</b></td> + <td>[]string</td> + <td> + The command to be executed as string array.<br/> + </td> + <td>false</td> + </tr><tr> + <td><b>timeoutSeconds</b></td> + <td>integer</td> + <td> + Specifies the timeout (in seconds) for the specified command.<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.loadGenerator.afterActions[index].selector +<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorafteractionsindex)</sup></sup> + + + +The selector specifies which resource should be selected for the execution of the command. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>container</b></td> + <td>string</td> + <td> + Specifies the container.<br/> + <br/> + <i>Default</i>: <br/> + </td> + <td>false</td> + </tr><tr> + <td><b><a href="#benchmarkspecloadgeneratorafteractionsindexselectorpod">pod</a></b></td> + <td>object</td> + <td> + Specifies the pod.<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.loadGenerator.afterActions[index].selector.pod +<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorafteractionsindexselector)</sup></sup> + + + +Specifies the pod. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>matchLabels</b></td> + <td>map[string]string</td> + <td> + The matchLabels of the desired pod.<br/> + <br/> + <i>Default</i>: map[]<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.loadGenerator.beforeActions[index] +<sup><sup>[↩ Parent](#benchmarkspecloadgenerator)</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="#benchmarkspecloadgeneratorbeforeactionsindexexec">exec</a></b></td> + <td>object</td> + <td> + Specifies command to be executed.<br/> + </td> + <td>false</td> + </tr><tr> + <td><b><a href="#benchmarkspecloadgeneratorbeforeactionsindexselector">selector</a></b></td> + <td>object</td> + <td> + The selector specifies which resource should be selected for the execution of the command.<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.loadGenerator.beforeActions[index].exec +<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorbeforeactionsindex)</sup></sup> + + + +Specifies command to be executed. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>command</b></td> + <td>[]string</td> + <td> + The command to be executed as string array.<br/> + </td> + <td>false</td> + </tr><tr> + <td><b>timeoutSeconds</b></td> + <td>integer</td> + <td> + Specifies the timeout (in seconds) for the specified command.<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.loadGenerator.beforeActions[index].selector +<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorbeforeactionsindex)</sup></sup> + + + +The selector specifies which resource should be selected for the execution of the command. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>container</b></td> + <td>string</td> + <td> + Specifies the container.<br/> + <br/> + <i>Default</i>: <br/> + </td> + <td>false</td> + </tr><tr> + <td><b><a href="#benchmarkspecloadgeneratorbeforeactionsindexselectorpod">pod</a></b></td> + <td>object</td> + <td> + Specifies the pod.<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.loadGenerator.beforeActions[index].selector.pod +<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorbeforeactionsindexselector)</sup></sup> + + + +Specifies the pod. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>matchLabels</b></td> + <td>map[string]string</td> + <td> + The matchLabels of the desired pod.<br/> + <br/> + <i>Default</i>: map[]<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.loadGenerator.resources[index] +<sup><sup>[↩ Parent](#benchmarkspecloadgenerator)</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="#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="#benchmarkspecloadgeneratorresourcesindexfilesystem">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.loadGenerator.resources[index].configMap +<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorresourcesindex)</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.loadGenerator.resources[index].fileSystem +<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorresourcesindex)</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> + + +### benchmark.spec.loadTypes[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="#benchmarkspecloadtypesindexpatchersindex">patchers</a></b></td> + <td>[]object</td> + <td> + List of patchers used to scale this resource type.<br/> + </td> + <td>true</td> + </tr><tr> + <td><b>typeName</b></td> + <td>string</td> + <td> + Name of the load type.<br/> + </td> + <td>true</td> + </tr></tbody> +</table> + + +### benchmark.spec.loadTypes[index].patchers[index] +<sup><sup>[↩ Parent](#benchmarkspecloadtypesindex)</sup></sup> + + + + + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>properties</b></td> + <td>map[string]string</td> + <td> + (Optional) Patcher specific additional arguments.<br/> + <br/> + <i>Default</i>: map[]<br/> + </td> + <td>false</td> + </tr><tr> + <td><b>resource</b></td> + <td>string</td> + <td> + Specifies the Kubernetes resource to be patched.<br/> + <br/> + <i>Default</i>: <br/> + </td> + <td>true</td> + </tr><tr> + <td><b>type</b></td> + <td>string</td> + <td> + Type of the Patcher.<br/> + <br/> + <i>Default</i>: <br/> + </td> + <td>true</td> + </tr></tbody> +</table> + + +### benchmark.spec.resourceTypes[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="#benchmarkspecresourcetypesindexpatchersindex">patchers</a></b></td> + <td>[]object</td> + <td> + List of patchers used to scale this resource type.<br/> + </td> + <td>true</td> + </tr><tr> + <td><b>typeName</b></td> + <td>string</td> + <td> + Name of the resource type.<br/> + </td> + <td>true</td> + </tr></tbody> +</table> + + +### benchmark.spec.resourceTypes[index].patchers[index] +<sup><sup>[↩ Parent](#benchmarkspecresourcetypesindex)</sup></sup> + + + + + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>properties</b></td> + <td>map[string]string</td> + <td> + (Optional) Patcher specific additional arguments.<br/> + <br/> + <i>Default</i>: map[]<br/> + </td> + <td>false</td> + </tr><tr> + <td><b>resource</b></td> + <td>string</td> + <td> + Specifies the Kubernetes resource to be patched.<br/> + <br/> + <i>Default</i>: <br/> + </td> + <td>true</td> + </tr><tr> + <td><b>type</b></td> + <td>string</td> + <td> + Type of the patcher.<br/> + <br/> + <i>Default</i>: <br/> + </td> + <td>true</td> </tr></tbody> </table> @@ -700,6 +1268,24 @@ The appResourceSets specifies all Kubernetes resources required to start the sut </tr> </thead> <tbody><tr> + <td><b><a href="#benchmarkspecsutafteractionsindex">afterActions</a></b></td> + <td>[]object</td> + <td> + <br/> + <br/> + <i>Default</i>: []<br/> + </td> + <td>false</td> + </tr><tr> + <td><b><a href="#benchmarkspecsutbeforeactionsindex">beforeActions</a></b></td> + <td>[]object</td> + <td> + SUT before actions are executed before the SUT is started.<br/> + <br/> + <i>Default</i>: []<br/> + </td> + <td>false</td> + </tr><tr> <td><b><a href="#benchmarkspecsutresourcesindex">resources</a></b></td> <td>[]object</td> <td> @@ -712,6 +1298,272 @@ The appResourceSets specifies all Kubernetes resources required to start the sut </table> +### benchmark.spec.sut.afterActions[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="#benchmarkspecsutafteractionsindexexec">exec</a></b></td> + <td>object</td> + <td> + Specifies command to be executed.<br/> + </td> + <td>false</td> + </tr><tr> + <td><b><a href="#benchmarkspecsutafteractionsindexselector">selector</a></b></td> + <td>object</td> + <td> + The selector specifies which resource should be selected for the execution of the command.<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.sut.afterActions[index].exec +<sup><sup>[↩ Parent](#benchmarkspecsutafteractionsindex)</sup></sup> + + + +Specifies command to be executed. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>command</b></td> + <td>[]string</td> + <td> + The command to be executed as string array.<br/> + </td> + <td>false</td> + </tr><tr> + <td><b>timeoutSeconds</b></td> + <td>integer</td> + <td> + Specifies the timeout (in seconds) for the specified command.<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.sut.afterActions[index].selector +<sup><sup>[↩ Parent](#benchmarkspecsutafteractionsindex)</sup></sup> + + + +The selector specifies which resource should be selected for the execution of the command. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>container</b></td> + <td>string</td> + <td> + Specifies the container.<br/> + <br/> + <i>Default</i>: <br/> + </td> + <td>false</td> + </tr><tr> + <td><b><a href="#benchmarkspecsutafteractionsindexselectorpod">pod</a></b></td> + <td>object</td> + <td> + Specifies the pod.<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.sut.afterActions[index].selector.pod +<sup><sup>[↩ Parent](#benchmarkspecsutafteractionsindexselector)</sup></sup> + + + +Specifies the pod. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>matchLabels</b></td> + <td>map[string]string</td> + <td> + The matchLabels of the desired pod.<br/> + <br/> + <i>Default</i>: map[]<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.sut.beforeActions[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="#benchmarkspecsutbeforeactionsindexexec">exec</a></b></td> + <td>object</td> + <td> + Specifies command to be executed.<br/> + </td> + <td>false</td> + </tr><tr> + <td><b><a href="#benchmarkspecsutbeforeactionsindexselector">selector</a></b></td> + <td>object</td> + <td> + The selector specifies which resource should be selected for the execution of the command.<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.sut.beforeActions[index].exec +<sup><sup>[↩ Parent](#benchmarkspecsutbeforeactionsindex)</sup></sup> + + + +Specifies command to be executed. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>command</b></td> + <td>[]string</td> + <td> + The command to be executed as string array.<br/> + </td> + <td>false</td> + </tr><tr> + <td><b>timeoutSeconds</b></td> + <td>integer</td> + <td> + Specifies the timeout (in seconds) for the specified command.<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.sut.beforeActions[index].selector +<sup><sup>[↩ Parent](#benchmarkspecsutbeforeactionsindex)</sup></sup> + + + +The selector specifies which resource should be selected for the execution of the command. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>container</b></td> + <td>string</td> + <td> + Specifies the container.<br/> + <br/> + <i>Default</i>: <br/> + </td> + <td>false</td> + </tr><tr> + <td><b><a href="#benchmarkspecsutbeforeactionsindexselectorpod">pod</a></b></td> + <td>object</td> + <td> + Specifies the pod.<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.sut.beforeActions[index].selector.pod +<sup><sup>[↩ Parent](#benchmarkspecsutbeforeactionsindexselector)</sup></sup> + + + +Specifies the pod. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>matchLabels</b></td> + <td>map[string]string</td> + <td> + The matchLabels of the desired pod.<br/> + <br/> + <i>Default</i>: map[]<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + ### benchmark.spec.sut.resources[index] <sup><sup>[↩ Parent](#benchmarkspecsut)</sup></sup> diff --git a/theodolite/crd/crd-benchmark.yaml b/theodolite/crd/crd-benchmark.yaml index e3d7f8a97..cd9c9f1e0 100644 --- a/theodolite/crd/crd-benchmark.yaml +++ b/theodolite/crd/crd-benchmark.yaml @@ -67,58 +67,76 @@ spec: beforeActions: type: array default: [] + description: Infrastructure before actions are executed before the infrastructure is set up. items: type: object properties: selector: type: object + description: The selector specifies which resource should be selected for the execution of the command. properties: pod: type: object + description: Specifies the pod. properties: matchLabels: type: object + description: The matchLabels of the desired pod. additionalProperties: true x-kubernetes-map-type: "granular" default: { } container: + description: Specifies the container. + default: "" type: string exec: type: object + description: Specifies command to be executed. properties: command: type: array + description: The command to be executed as string array. items: type: string timeoutSeconds: + description: Specifies the timeout (in seconds) for the specified command. type: integer afterActions: type: array default: [] + description: Infrastructure after actions are executed after the teardown of the infrastructure. items: type: object properties: selector: type: object + description: The selector specifies which resource should be selected for the execution of the command. properties: pod: type: object + description: Specifies the pod. properties: matchLabels: type: object + description: The matchLabels of the desired pod. additionalProperties: true x-kubernetes-map-type: "granular" default: { } container: + description: Specifies the container. + default: "" type: string exec: type: object + description: Specifies command to be executed. properties: command: type: array + description: The command to be executed as string array. items: type: string timeoutSeconds: + description: Specifies the timeout (in seconds) for the specified command. type: integer 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. @@ -160,30 +178,39 @@ spec: beforeActions: type: array default: [] + description: SUT before actions are executed before the SUT is started. items: type: object properties: selector: type: object + description: The selector specifies which resource should be selected for the execution of the command. properties: pod: type: object + description: Specifies the pod. properties: matchLabels: type: object + description: The matchLabels of the desired pod. additionalProperties: true x-kubernetes-map-type: "granular" default: { } container: + description: Specifies the container. + default: "" type: string exec: type: object + description: Specifies command to be executed. properties: command: type: array + description: The command to be executed as string array. items: type: string timeoutSeconds: + description: Specifies the timeout (in seconds) for the specified command. type: integer afterActions: type: array @@ -193,25 +220,33 @@ spec: properties: selector: type: object + description: The selector specifies which resource should be selected for the execution of the command. properties: pod: type: object + description: Specifies the pod. properties: matchLabels: type: object + description: The matchLabels of the desired pod. additionalProperties: true x-kubernetes-map-type: "granular" default: { } container: + description: Specifies the container. + default: "" type: string exec: type: object + description: Specifies command to be executed. properties: command: type: array + description: The command to be executed as string array. items: type: string timeoutSeconds: + description: Specifies the timeout (in seconds) for the specified command. type: integer 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. @@ -253,58 +288,76 @@ spec: beforeActions: type: array default: [ ] + description: Load generator before actions are executed before the load generator is started. items: type: object properties: selector: type: object + description: The selector specifies which resource should be selected for the execution of the command. properties: pod: type: object + description: Specifies the pod. properties: matchLabels: type: object + description: The matchLabels of the desired pod. additionalProperties: true x-kubernetes-map-type: "granular" default: { } container: + description: Specifies the container. + default: "" type: string exec: type: object + description: Specifies command to be executed. properties: command: type: array + description: The command to be executed as string array. items: type: string timeoutSeconds: + description: Specifies the timeout (in seconds) for the specified command. type: integer afterActions: type: array default: [] + description: Load generator after actions are executed after the teardown of the load generator. items: type: object properties: selector: type: object + description: The selector specifies which resource should be selected for the execution of the command. properties: pod: type: object + description: Specifies the pod. properties: matchLabels: type: object + description: The matchLabels of the desired pod. additionalProperties: true x-kubernetes-map-type: "granular" default: { } container: + description: Specifies the container. + default: "" type: string exec: type: object + description: Specifies command to be executed. properties: command: type: array + description: The command to be executed as string array. items: type: string timeoutSeconds: + description: Specifies the timeout (in seconds) for the specified command. type: integer 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. diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt b/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt index 67d0c8075..2514c3215 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt +++ b/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt @@ -67,12 +67,12 @@ class KubernetesBenchmark : KubernetesResource, Benchmark { } override fun teardownInfrastructure() { - this.infrastructure.afterActions.forEach { it.exec(client = client) } val kubernetesManager = K8sManager(this.client) loadKubernetesResources(this.infrastructure.resources) .map{it.second} .forEach { kubernetesManager.remove(it) } - } + this.infrastructure.afterActions.forEach { it.exec(client = client) } + } /** * Builds a deployment. -- GitLab