diff --git a/docs/crd-benchmark-doc.md b/docs/crd-benchmark-doc.md deleted file mode 100644 index 1e12d6ebd776b11d76241cfb530daeba9e0b5c24..0000000000000000000000000000000000000000 --- a/docs/crd-benchmark-doc.md +++ /dev/null @@ -1,374 +0,0 @@ -# API Reference - -Packages: - -- [theodolite.com/v1](#theodolitecomv1) - -# theodolite.com/v1 - -Resource Types: - -- [benchmark](#benchmark) - - - - -## benchmark -<sup><sup>[↩ Parent](#theodolitecomv1 )</sup></sup> - - - - - - - - -<table> - <thead> - <tr> - <th>Name</th> - <th>Type</th> - <th>Description</th> - <th>Required</th> - </tr> - </thead> - <tbody><tr> - <td><b>apiVersion</b></td> - <td>string</td> - <td>theodolite.com/v1</td> - <td>true</td> - </tr> - <tr> - <td><b>kind</b></td> - <td>string</td> - <td>benchmark</td> - <td>true</td> - </tr> - <tr> - <td><b><a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#objectmeta-v1-meta">metadata</a></b></td> - <td>object</td> - <td>Refer to the Kubernetes API documentation for the fields of the `metadata` field.</td> - <td>true</td> - </tr><tr> - <td><b><a href="#benchmarkspec">spec</a></b></td> - <td>object</td> - <td> - <br/> - </td> - <td>true</td> - </tr></tbody> -</table> - - -### benchmark.spec -<sup><sup>[↩ Parent](#benchmark)</sup></sup> - - - - - -<table> - <thead> - <tr> - <th>Name</th> - <th>Type</th> - <th>Description</th> - <th>Required</th> - </tr> - </thead> - <tbody><tr> - <td><b>name</b></td> - <td>string</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/> - </td> - <td>false</td> - </tr><tr> - <td><b>appResource</b></td> - <td>[]string</td> - <td> - A list of file names that reference Kubernetes resources that are deployed on the cluster for the system under test (SUT).<br/> - </td> - <td>true</td> - </tr><tr> - <td><b><a href="#benchmarkspeckafkaconfig">kafkaConfig</a></b></td> - <td>object</td> - <td> - Contains the Kafka configuration.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b>loadGenResource</b></td> - <td>[]string</td> - <td> - A list of file names that reference Kubernetes resources that are deployed on the cluster for the load generator.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b><a href="#benchmarkspecloadtypesindex">loadTypes</a></b></td> - <td>[]object</td> - <td> - A list of load types that can be scaled for this benchmark. For each load type the concrete values are defined in the execution object.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b><a href="#benchmarkspecresourcetypesindex">resourceTypes</a></b></td> - <td>[]object</td> - <td> - 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></tbody> -</table> - - -### benchmark.spec.kafkaConfig -<sup><sup>[↩ Parent](#benchmarkspec)</sup></sup> - - - -Contains the Kafka configuration. - -<table> - <thead> - <tr> - <th>Name</th> - <th>Type</th> - <th>Description</th> - <th>Required</th> - </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> - 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.kafkaConfig.topics[index] -<sup><sup>[↩ Parent](#benchmarkspeckafkaconfig)</sup></sup> - - - - - -<table> - <thead> - <tr> - <th>Name</th> - <th>Type</th> - <th>Description</th> - <th>Required</th> - </tr> - </thead> - <tbody><tr> - <td><b>removeOnly</b></td> - <td>boolean</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/> - </td> - <td>false</td> - </tr><tr> - <td><b>name</b></td> - <td>string</td> - <td> - The name of the topic.<br/> - <br/> - <i>Default</i>: <br/> - </td> - <td>true</td> - </tr><tr> - <td><b>numPartitions</b></td> - <td>integer</td> - <td> - The number of partitions of the topic.<br/> - <br/> - <i>Default</i>: 0<br/> - </td> - <td>true</td> - </tr><tr> - <td><b>replicationFactor</b></td> - <td>integer</td> - <td> - The replication factor of the topic.<br/> - <br/> - <i>Default</i>: 0<br/> - </td> - <td>true</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>object</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>object</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> \ No newline at end of file diff --git a/docs/crd-docu.md b/docs/crd-docu.md new file mode 100644 index 0000000000000000000000000000000000000000..60ad46b27f0c0fd305e82199182fb490e87f4d7e --- /dev/null +++ b/docs/crd-docu.md @@ -0,0 +1,992 @@ +# API Reference + +Packages: + +- [theodolite.com/v1](#theodolitecomv1) + +# theodolite.com/v1 + +Resource Types: + +- [benchmark](#benchmark) + +- [execution](#execution) + + + + +## benchmark +<sup><sup>[↩ Parent](#theodolitecomv1 )</sup></sup> + + + + + + + + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>apiVersion</b></td> + <td>string</td> + <td>theodolite.com/v1</td> + <td>true</td> + </tr> + <tr> + <td><b>kind</b></td> + <td>string</td> + <td>benchmark</td> + <td>true</td> + </tr> + <tr> + <td><b><a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#objectmeta-v1-meta">metadata</a></b></td> + <td>object</td> + <td>Refer to the Kubernetes API documentation for the fields of the `metadata` field.</td> + <td>true</td> + </tr><tr> + <td><b><a href="#benchmarkspec">spec</a></b></td> + <td>object</td> + <td> + <br/> + </td> + <td>true</td> + </tr></tbody> +</table> + + +### benchmark.spec +<sup><sup>[↩ Parent](#benchmark)</sup></sup> + + + + + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>name</b></td> + <td>string</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/> + </td> + <td>false</td> + </tr><tr> + <td><b><a href="#benchmarkspecappresourcesetsindex">appResourceSets</a></b></td> + <td>[]object</td> + <td> + <br/> + </td> + <td>true</td> + </tr><tr> + <td><b><a href="#benchmarkspeckafkaconfig">kafkaConfig</a></b></td> + <td>object</td> + <td> + Contains the Kafka configuration.<br/> + </td> + <td>true</td> + </tr><tr> + <td><b><a href="#benchmarkspecloadgenresourcesetsindex">loadGenResourceSets</a></b></td> + <td>[]object</td> + <td> + <br/> + </td> + <td>true</td> + </tr><tr> + <td><b><a href="#benchmarkspecloadtypesindex">loadTypes</a></b></td> + <td>[]object</td> + <td> + A list of load types that can be scaled for this benchmark. For each load type the concrete values are defined in the execution object.<br/> + </td> + <td>true</td> + </tr><tr> + <td><b><a href="#benchmarkspecresourcetypesindex">resourceTypes</a></b></td> + <td>[]object</td> + <td> + 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></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> + <br/> + </td> + <td>false</td> + </tr><tr> + <td><b><a href="#benchmarkspecappresourcesetsindexfilesystem">fileSystem</a></b></td> + <td>object</td> + <td> + <br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.appResourceSets[index].configMap +<sup><sup>[↩ Parent](#benchmarkspecappresourcesetsindex)</sup></sup> + + + + + +<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> + <br/> + </td> + <td>false</td> + </tr><tr> + <td><b>name</b></td> + <td>string</td> + <td> + <br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.appResourceSets[index].fileSystem +<sup><sup>[↩ Parent](#benchmarkspecappresourcesetsindex)</sup></sup> + + + + + +<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> + <br/> + </td> + <td>false</td> + </tr><tr> + <td><b>path</b></td> + <td>string</td> + <td> + <br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.kafkaConfig +<sup><sup>[↩ Parent](#benchmarkspec)</sup></sup> + + + +Contains the Kafka configuration. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </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> + 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.kafkaConfig.topics[index] +<sup><sup>[↩ Parent](#benchmarkspeckafkaconfig)</sup></sup> + + + + + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>numPartitions</b></td> + <td>integer</td> + <td> + The number of partitions of the topic.<br/> + <br/> + <i>Default</i>: 0<br/> + </td> + <td>false</td> + </tr><tr> + <td><b>removeOnly</b></td> + <td>boolean</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/> + </td> + <td>false</td> + </tr><tr> + <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> + The name of the topic.<br/> + <br/> + <i>Default</i>: <br/> + </td> + <td>true</td> + </tr></tbody> +</table> + + +### benchmark.spec.loadGenResourceSets[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="#benchmarkspecloadgenresourcesetsindexconfigmap">configMap</a></b></td> + <td>object</td> + <td> + <br/> + </td> + <td>false</td> + </tr><tr> + <td><b><a href="#benchmarkspecloadgenresourcesetsindexfilesystem">fileSystem</a></b></td> + <td>object</td> + <td> + <br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.loadGenResourceSets[index].configMap +<sup><sup>[↩ Parent](#benchmarkspecloadgenresourcesetsindex)</sup></sup> + + + + + +<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> + <br/> + </td> + <td>false</td> + </tr><tr> + <td><b>name</b></td> + <td>string</td> + <td> + <br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.loadGenResourceSets[index].fileSystem +<sup><sup>[↩ Parent](#benchmarkspecloadgenresourcesetsindex)</sup></sup> + + + + + +<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> + <br/> + </td> + <td>false</td> + </tr><tr> + <td><b>path</b></td> + <td>string</td> + <td> + <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>object</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>object</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> + +## execution +<sup><sup>[↩ Parent](#theodolitecomv1 )</sup></sup> + + + + + + + + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>apiVersion</b></td> + <td>string</td> + <td>theodolite.com/v1</td> + <td>true</td> + </tr> + <tr> + <td><b>kind</b></td> + <td>string</td> + <td>execution</td> + <td>true</td> + </tr> + <tr> + <td><b><a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#objectmeta-v1-meta">metadata</a></b></td> + <td>object</td> + <td>Refer to the Kubernetes API documentation for the fields of the `metadata` field.</td> + <td>true</td> + </tr><tr> + <td><b><a href="#executionstatus">status</a></b></td> + <td>object</td> + <td> + <br/> + </td> + <td>false</td> + </tr><tr> + <td><b><a href="#executionspec">spec</a></b></td> + <td>object</td> + <td> + <br/> + </td> + <td>true</td> + </tr></tbody> +</table> + + +### execution.status +<sup><sup>[↩ Parent](#execution)</sup></sup> + + + + + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>executionDuration</b></td> + <td>string</td> + <td> + Duration of the execution in seconds<br/> + </td> + <td>false</td> + </tr><tr> + <td><b>executionState</b></td> + <td>string</td> + <td> + <br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### execution.spec +<sup><sup>[↩ Parent](#execution)</sup></sup> + + + + + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>name</b></td> + <td>string</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/> + <br/> + <i>Default</i>: <br/> + </td> + <td>false</td> + </tr><tr> + <td><b>benchmark</b></td> + <td>string</td> + <td> + The name of the benchmark this execution is referring to.<br/> + </td> + <td>true</td> + </tr><tr> + <td><b><a href="#executionspecconfigoverridesindex">configOverrides</a></b></td> + <td>[]object</td> + <td> + List of patchers that are used to override existing configurations.<br/> + </td> + <td>true</td> + </tr><tr> + <td><b><a href="#executionspecexecution">execution</a></b></td> + <td>object</td> + <td> + Defines the overall parameter for the execution.<br/> + </td> + <td>true</td> + </tr><tr> + <td><b><a href="#executionspecload">load</a></b></td> + <td>object</td> + <td> + Specifies the load values that are benchmarked.<br/> + </td> + <td>true</td> + </tr><tr> + <td><b><a href="#executionspecresources">resources</a></b></td> + <td>object</td> + <td> + Specifies the scaling resource that is benchmarked.<br/> + </td> + <td>true</td> + </tr><tr> + <td><b><a href="#executionspecslosindex">slos</a></b></td> + <td>[]object</td> + <td> + List of resource values for the specified resource type.<br/> + </td> + <td>true</td> + </tr></tbody> +</table> + + +### execution.spec.configOverrides[index] +<sup><sup>[↩ Parent](#executionspec)</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="#executionspecconfigoverridesindexpatcher">patcher</a></b></td> + <td>object</td> + <td> + Patcher used to patch a resource<br/> + </td> + <td>false</td> + </tr><tr> + <td><b>value</b></td> + <td>string</td> + <td> + <br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### execution.spec.configOverrides[index].patcher +<sup><sup>[↩ Parent](#executionspecconfigoverridesindex)</sup></sup> + + + +Patcher used to patch a resource + +<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>object</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> + + +### execution.spec.execution +<sup><sup>[↩ Parent](#executionspec)</sup></sup> + + + +Defines the overall parameter for the execution. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>loadGenerationDelay</b></td> + <td>integer</td> + <td> + Seconds to wait between the start of the SUT and the load generator.<br/> + </td> + <td>false</td> + </tr><tr> + <td><b>duration</b></td> + <td>integer</td> + <td> + Defines the duration of each experiment in seconds.<br/> + </td> + <td>true</td> + </tr><tr> + <td><b>repetitions</b></td> + <td>integer</td> + <td> + Numper of repititions for each experiments.<br/> + </td> + <td>true</td> + </tr><tr> + <td><b>restrictions</b></td> + <td>[]string</td> + <td> + List of restriction strategys used to delimit the search space.<br/> + </td> + <td>true</td> + </tr><tr> + <td><b>strategy</b></td> + <td>string</td> + <td> + Defines the used strategy for the execution, either 'LinearSearch' or 'BinarySearch'<br/> + </td> + <td>true</td> + </tr></tbody> +</table> + + +### execution.spec.load +<sup><sup>[↩ Parent](#executionspec)</sup></sup> + + + +Specifies the load values that are benchmarked. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>loadType</b></td> + <td>string</td> + <td> + The type of the load. It must match one of the load types specified in the referenced benchmark.<br/> + </td> + <td>true</td> + </tr><tr> + <td><b>loadValues</b></td> + <td>[]integer</td> + <td> + List of load values for the specified load type.<br/> + </td> + <td>true</td> + </tr></tbody> +</table> + + +### execution.spec.resources +<sup><sup>[↩ Parent](#executionspec)</sup></sup> + + + +Specifies the scaling resource that is benchmarked. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b>resourceType</b></td> + <td>string</td> + <td> + The type of the resource. It must match one of the resource types specified in the referenced benchmark.<br/> + </td> + <td>true</td> + </tr><tr> + <td><b>resourceValues</b></td> + <td>[]integer</td> + <td> + List of resource values for the specified resource type.<br/> + </td> + <td>true</td> + </tr></tbody> +</table> + + +### execution.spec.slos[index] +<sup><sup>[↩ Parent](#executionspec)</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>object</td> + <td> + (Optional) SLO specific additional arguments.<br/> + <br/> + <i>Default</i>: map[]<br/> + </td> + <td>false</td> + </tr><tr> + <td><b>offset</b></td> + <td>integer</td> + <td> + Hours by which the start and end timestamp will be shifted (for different timezones).<br/> + </td> + <td>true</td> + </tr><tr> + <td><b>prometheusUrl</b></td> + <td>string</td> + <td> + Connection string for Promehteus.<br/> + </td> + <td>true</td> + </tr><tr> + <td><b>sloType</b></td> + <td>string</td> + <td> + The type of the SLO. It must match 'lag trend'.<br/> + </td> + <td>true</td> + </tr></tbody> +</table> \ No newline at end of file diff --git a/docs/crd-execution-doc.md b/docs/crd-execution-doc.md deleted file mode 100644 index 21b5cdecabd4a247df9f2c0c8d376ad578f4032f..0000000000000000000000000000000000000000 --- a/docs/crd-execution-doc.md +++ /dev/null @@ -1,438 +0,0 @@ -# API Reference - -Packages: - -- [theodolite.com/v1](#theodolitecomv1) - -# theodolite.com/v1 - -Resource Types: - -- [execution](#execution) - - - - -## execution -<sup><sup>[↩ Parent](#theodolitecomv1 )</sup></sup> - - - - - - - - -<table> - <thead> - <tr> - <th>Name</th> - <th>Type</th> - <th>Description</th> - <th>Required</th> - </tr> - </thead> - <tbody><tr> - <td><b>apiVersion</b></td> - <td>string</td> - <td>theodolite.com/v1</td> - <td>true</td> - </tr> - <tr> - <td><b>kind</b></td> - <td>string</td> - <td>execution</td> - <td>true</td> - </tr> - <tr> - <td><b><a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#objectmeta-v1-meta">metadata</a></b></td> - <td>object</td> - <td>Refer to the Kubernetes API documentation for the fields of the `metadata` field.</td> - <td>true</td> - </tr><tr> - <td><b><a href="#executionstatus">status</a></b></td> - <td>object</td> - <td> - <br/> - </td> - <td>false</td> - </tr><tr> - <td><b><a href="#executionspec">spec</a></b></td> - <td>object</td> - <td> - <br/> - </td> - <td>true</td> - </tr></tbody> -</table> - - -### execution.status -<sup><sup>[↩ Parent](#execution)</sup></sup> - - - - - -<table> - <thead> - <tr> - <th>Name</th> - <th>Type</th> - <th>Description</th> - <th>Required</th> - </tr> - </thead> - <tbody><tr> - <td><b>executionDuration</b></td> - <td>string</td> - <td> - Duration of the execution in seconds<br/> - </td> - <td>false</td> - </tr><tr> - <td><b>executionState</b></td> - <td>string</td> - <td> - <br/> - </td> - <td>false</td> - </tr></tbody> -</table> - - -### execution.spec -<sup><sup>[↩ Parent](#execution)</sup></sup> - - - - - -<table> - <thead> - <tr> - <th>Name</th> - <th>Type</th> - <th>Description</th> - <th>Required</th> - </tr> - </thead> - <tbody><tr> - <td><b>name</b></td> - <td>string</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/> - <br/> - <i>Default</i>: <br/> - </td> - <td>false</td> - </tr><tr> - <td><b>benchmark</b></td> - <td>string</td> - <td> - The name of the benchmark this execution is referring to.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b><a href="#executionspecconfigoverridesindex">configOverrides</a></b></td> - <td>[]object</td> - <td> - List of patchers that are used to override existing configurations.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b><a href="#executionspecexecution">execution</a></b></td> - <td>object</td> - <td> - Defines the overall parameter for the execution.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b><a href="#executionspecload">load</a></b></td> - <td>object</td> - <td> - Specifies the load values that are benchmarked.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b><a href="#executionspecresources">resources</a></b></td> - <td>object</td> - <td> - Specifies the scaling resource that is benchmarked.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b><a href="#executionspecslosindex">slos</a></b></td> - <td>[]object</td> - <td> - List of resource values for the specified resource type.<br/> - </td> - <td>true</td> - </tr></tbody> -</table> - - -### execution.spec.configOverrides[index] -<sup><sup>[↩ Parent](#executionspec)</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="#executionspecconfigoverridesindexpatcher">patcher</a></b></td> - <td>object</td> - <td> - Patcher used to patch a resource<br/> - </td> - <td>false</td> - </tr><tr> - <td><b>value</b></td> - <td>string</td> - <td> - <br/> - </td> - <td>false</td> - </tr></tbody> -</table> - - -### execution.spec.configOverrides[index].patcher -<sup><sup>[↩ Parent](#executionspecconfigoverridesindex)</sup></sup> - - - -Patcher used to patch a resource - -<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>object</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> - - -### execution.spec.execution -<sup><sup>[↩ Parent](#executionspec)</sup></sup> - - - -Defines the overall parameter for the execution. - -<table> - <thead> - <tr> - <th>Name</th> - <th>Type</th> - <th>Description</th> - <th>Required</th> - </tr> - </thead> - <tbody><tr> - <td><b>loadGenerationDelay</b></td> - <td>integer</td> - <td> - Seconds to wait between the start of the SUT and the load generator.<br/> - </td> - <td>false</td> - </tr><tr> - <td><b>duration</b></td> - <td>integer</td> - <td> - Defines the duration of each experiment in seconds.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b>repetitions</b></td> - <td>integer</td> - <td> - Numper of repititions for each experiments.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b>restrictions</b></td> - <td>[]string</td> - <td> - List of restriction strategys used to delimit the search space.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b>strategy</b></td> - <td>string</td> - <td> - Defines the used strategy for the execution, either 'LinearSearch' or 'BinarySearch'<br/> - </td> - <td>true</td> - </tr></tbody> -</table> - - -### execution.spec.load -<sup><sup>[↩ Parent](#executionspec)</sup></sup> - - - -Specifies the load values that are benchmarked. - -<table> - <thead> - <tr> - <th>Name</th> - <th>Type</th> - <th>Description</th> - <th>Required</th> - </tr> - </thead> - <tbody><tr> - <td><b>loadType</b></td> - <td>string</td> - <td> - The type of the load. It must match one of the load types specified in the referenced benchmark.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b>loadValues</b></td> - <td>[]integer</td> - <td> - List of load values for the specified load type.<br/> - </td> - <td>true</td> - </tr></tbody> -</table> - - -### execution.spec.resources -<sup><sup>[↩ Parent](#executionspec)</sup></sup> - - - -Specifies the scaling resource that is benchmarked. - -<table> - <thead> - <tr> - <th>Name</th> - <th>Type</th> - <th>Description</th> - <th>Required</th> - </tr> - </thead> - <tbody><tr> - <td><b>resourceType</b></td> - <td>string</td> - <td> - The type of the resource. It must match one of the resource types specified in the referenced benchmark.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b>resourceValues</b></td> - <td>[]integer</td> - <td> - <br/> - </td> - <td>true</td> - </tr></tbody> -</table> - - -### execution.spec.slos[index] -<sup><sup>[↩ Parent](#executionspec)</sup></sup> - - - - - -<table> - <thead> - <tr> - <th>Name</th> - <th>Type</th> - <th>Description</th> - <th>Required</th> - </tr> - </thead> - <tbody><tr> - <td><b>externalSloUrl</b></td> - <td>string</td> - <td> - Connection string for a external slo analysis.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b>offset</b></td> - <td>integer</td> - <td> - Hours by which the start and end timestamp will be shifted (for different timezones).<br/> - </td> - <td>true</td> - </tr><tr> - <td><b>prometheusUrl</b></td> - <td>string</td> - <td> - Connection string for Promehteus.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b>sloType</b></td> - <td>string</td> - <td> - The type of the SLO. It must match 'lag trend'.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b>threshold</b></td> - <td>integer</td> - <td> - The threshold the SUT should meet for a sucessful experiment.<br/> - </td> - <td>true</td> - </tr><tr> - <td><b>warmup</b></td> - <td>integer</td> - <td> - Seconds of time that are ignored in the analysis.<br/> - </td> - <td>true</td> - </tr></tbody> -</table> \ No newline at end of file diff --git a/theodolite/examples/operator/example-benchmark.yaml b/theodolite/examples/operator/example-benchmark.yaml index 1938bccf41311b0af786b39500b6b8f463d625c1..ad669f8648594d3c3079b4071361f01492eed027 100644 --- a/theodolite/examples/operator/example-benchmark.yaml +++ b/theodolite/examples/operator/example-benchmark.yaml @@ -21,7 +21,7 @@ spec: properties: loadGenMaxRecords: "15000" kafkaConfig: - bootstrapServer: "theodolite-cp-kafka:9092" + bootstrapServer: "localhost:9092" topics: - name: "input" numPartitions: 40 @@ -29,24 +29,28 @@ spec: - name: "theodolite-.*" removeOnly: True appResourceSets: - - fileSystem: - path: ./../../../../config - files: - - "uc1-kstreams-deployment.yaml" - - "aggregation-service.yaml" - - "jmx-configmap.yaml" - - "uc1-service-monitor.yaml" - # - configMap: - # configmap: "test-configmap" - # files: - # - "uc1-kstreams-deployment.yaml" - # - "aggregation-service.yaml" - # - "jmx-configmap.yaml" - # - "uc1-service-monitor.yaml" + # - fileSystem: + # path: ./../../../../../../config + # files: + # - "uc1-kstreams-deployment.yaml" + # - "aggregation-service.yaml" + # - "jmx-configmap.yaml" + # - "uc1-service-monitor.yaml" + - configMap: + name: "test-configmap" + files: + - "uc1-kstreams-deployment.yaml" + - "aggregation-service.yaml" + - "jmx-configmap.yaml" + - "uc1-service-monitor.yaml" loadGenResourceSets: - - fileSystem: - path: ./../../../../config - files: + # - fileSystem: + # path: ./../../../../../../config + # files: + # - uc1-load-generator-service.yaml + # - uc1-load-generator-deployment.yaml + - configMap: + name: "test-configmap" + files: - uc1-load-generator-service.yaml - - uc1-load-generator-deployment.yaml - \ No newline at end of file + - uc1-load-generator-deployment.yaml \ No newline at end of file diff --git a/theodolite/examples/operator/example-execution.yaml b/theodolite/examples/operator/example-execution.yaml index e2efb6e9a2bb6c08354b57a83506a601ac0ed96e..58ec761c4e6dc26ba4868fdeda0d80d9cb1e6c81 100644 --- a/theodolite/examples/operator/example-execution.yaml +++ b/theodolite/examples/operator/example-execution.yaml @@ -12,7 +12,7 @@ spec: resourceValues: [1, 2, 3, 4, 5] slos: - sloType: "lag trend" - prometheusUrl: "http://prometheus-operated:9090" + prometheusUrl: "http://localhost:9090" offset: 0 properties: threshold: 2000 diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/ConfigMapResourceSet.kt b/theodolite/src/main/kotlin/theodolite/benchmark/ConfigMapResourceSet.kt index bfe2b3dd73784017087f9a8454871fbd5937f02d..ba50ee01637fabdb77eb94ffafb6a8ff350b88e8 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/ConfigMapResourceSet.kt +++ b/theodolite/src/main/kotlin/theodolite/benchmark/ConfigMapResourceSet.kt @@ -2,7 +2,6 @@ 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.KubernetesClientException import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.quarkus.runtime.annotations.RegisterForReflection @@ -18,7 +17,7 @@ private val logger = KotlinLogging.logger {} @RegisterForReflection @JsonDeserialize class ConfigMapResourceSet: ResourceSet, KubernetesResource { - lateinit var configmap: String + lateinit var name: String lateinit var files: List<String> // load all files, iff files is not set @OptIn(ExperimentalStdlibApi::class) @@ -32,14 +31,14 @@ class ConfigMapResourceSet: ResourceSet, KubernetesResource { try { resources = client .configMaps() - .withName(configmap) + .withName(name) .get() .data .filter { it.key.endsWith(".yaml") } // consider only yaml files, e.g. ignore readme files } catch (e: KubernetesClientException) { - throw DeploymentFailedException("can not find or read configmap: $configmap, error is: ${e.message}") + throw DeploymentFailedException("can not find or read configmap: $name, error is: ${e.message}") } catch (e: IllegalStateException) { - throw DeploymentFailedException("can not find configmap or data section is null $configmap, error is: ${e.message}") + throw DeploymentFailedException("can not find configmap or data section is null $name, error is: ${e.message}") } if (::files.isInitialized){ diff --git a/theodolite/src/test/kotlin/theodolite/benchmark/ConfigMapResourceSetTest.kt b/theodolite/src/test/kotlin/theodolite/benchmark/ConfigMapResourceSetTest.kt index 8b9fa6e4e6cd1199fa39f7a8412f7ace7c7710f7..2cc8f931418e28ae8841b592f93df8d88440cf3c 100644 --- a/theodolite/src/test/kotlin/theodolite/benchmark/ConfigMapResourceSetTest.kt +++ b/theodolite/src/test/kotlin/theodolite/benchmark/ConfigMapResourceSetTest.kt @@ -10,19 +10,12 @@ import io.fabric8.kubernetes.client.server.mock.KubernetesServer import io.quarkus.test.junit.QuarkusTest import io.smallrye.common.constraint.Assert.assertTrue import junit.framework.Assert.assertEquals -import mu.KotlinLogging import org.junit.jupiter.api.AfterEach -import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test -import org.junitpioneer.jupiter.SetEnvironmentVariable -import theodolite.execution.operator.ExecutionCRDummy -import theodolite.execution.operator.TheodoliteOperator import theodolite.k8s.CustomResourceWrapper import theodolite.k8s.resourceLoader.K8sResourceLoaderFromFile -import theodolite.model.crd.ExecutionCRD import theodolite.util.DeploymentFailedException -import java.lang.IllegalStateException private val testResourcePath = "./src/test/resources/k8s-resource-files/" @@ -49,7 +42,7 @@ class ConfigMapResourceSetTest { server.client.configMaps().createOrReplace(configMap1) val resourceSet = ConfigMapResourceSet() - resourceSet.configmap = "test-configmap" + resourceSet.name = "test-configmap" return resourceSet.getResourceSet(server.client) } @@ -177,7 +170,7 @@ class ConfigMapResourceSetTest { server.client.configMaps().createOrReplace(configMap1) val resourceSet = ConfigMapResourceSet() - resourceSet.configmap = "test-configmap" + resourceSet.name = "test-configmap" val createdResourcesSet = resourceSet.getResourceSet(server.client) @@ -208,7 +201,7 @@ class ConfigMapResourceSetTest { server.client.configMaps().createOrReplace(configMap1) val resourceSet = ConfigMapResourceSet() - resourceSet.configmap = "test-configmap" + resourceSet.name = "test-configmap" resourceSet.files = listOf("test-deployment.yaml") val createdResourcesSet = resourceSet.getResourceSet(server.client) @@ -221,7 +214,7 @@ class ConfigMapResourceSetTest { @Test() fun testConfigMapNotExist() { val resourceSet = ConfigMapResourceSet() - resourceSet.configmap = "test-configmap1" + resourceSet.name = "test-configmap1" lateinit var ex: Exception try { resourceSet.getResourceSet(server.client)