Skip to content
Snippets Groups Projects
Commit 8fb6df67 authored by Benedikt Wetzel's avatar Benedikt Wetzel
Browse files

update crd docs

parent 10fa011f
No related branches found
No related tags found
1 merge request!201Introduce action commands
Pipeline #5892 passed
This diff is collapsed.
......@@ -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.
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment