Skip to content
Snippets Groups Projects
Commit facbfbab authored by Lorenz Boguhn's avatar Lorenz Boguhn
Browse files

initial try

parent 0a46081a
No related branches found
No related tags found
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!106Introduce a Theodolite operator,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
package theodolite.execution
import io.fabric8.kubernetes.client.DefaultKubernetesClient
import io.quarkus.runtime.annotations.QuarkusMain
import mu.KotlinLogging
import kotlin.system.exitProcess
private var DEFAULT_NAMESPACE = "default"
private val logger = KotlinLogging.logger {}
@QuarkusMain(name = "TheodoliteCRDExecutor")
object TheodoliteCRDExecutor {
@JvmStatic
fun main(args: Array<String>) {
val namespace = System.getenv("NAMESPACE") ?: DEFAULT_NAMESPACE
logger.info { "Using $namespace as namespace." }
val client = DefaultKubernetesClient().inNamespace(namespace)
println("hello there")
exitProcess(0)
}
}
......@@ -7,6 +7,7 @@ import theodolite.benchmark.KubernetesBenchmark
import theodolite.util.YamlParser
import kotlin.system.exitProcess
private var DEFAULT_NAMESPACE = "default"
private val logger = KotlinLogging.logger {}
@QuarkusMain(name = "TheodoliteYamlExecutor")
......
quarkus.package.main-class=TheodoliteYamlExecutor
\ No newline at end of file
quarkus.package.main-class=TheodoliteCRDExecutor
\ No newline at end of file
name: "Theodolite Test Context"
benchmark: "benchmarkType"
load:
loadType: "NumSensors"
loadValues:
- 50000
resources:
resourceType: "Instances"
resourceValues:
- 1
slos:
- sloType: "lag trend"
threshold: 1000
prometheusUrl: "http://localhost:32656"
externalSloUrl: "http://localhost:80/evaluate-slope"
offset: 0
warmup: 0
execution:
strategy: "LinearSearch"
duration: 60
repetitions: 1
restrictions:
- "LowerBound"
configOverrides:
- patcher:
type: "NodeSelectorPatcher"
resource: "uc1-load-generator-deployment.yaml"
variableName: "env"
value: "prod"
- patcher:
type: "NodeSelectorPatcher"
resource: "uc1-kstreams-deployment.yaml"
variableName: "env"
value: "prod"
- patcher:
type: "ResourceLimitPatcher"
resource: "uc1-kstreams-deployment.yaml"
container: "uc-application"
variableName: "cpu"
value: "1000m"
- patcher:
type: "ResourceLimitPatcher"
resource: "uc1-kstreams-deployment.yaml"
container: "uc-application"
variableName: "memory"
value: "2Gi"
\ No newline at end of file
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: Theodolite-Test-Context
spec:
name: string
benchmark: string
load:
loadType: string
loadValues:
- 50000
resources:
resourceType: "Instances"
resourceValues:
- 1
slos:
- sloType: "lag trend"
threshold: 1000
prometheusUrl: "http://localhost:32656"
externalSloUrl: "http://localhost:80/evaluate-slope"
offset: 0
warmup: 0
execution:
strategy: "LinearSearch"
duration: 60
repetitions: 1
restrictions:
- "LowerBound"
configOverrides:
- patcher:
type: "NodeSelectorPatcher"
resource: "uc1-load-generator-deployment.yaml"
variableName: "env"
value: "prod"
- patcher:
type: "NodeSelectorPatcher"
resource: "uc1-kstreams-deployment.yaml"
variableName: "env"
value: "prod"
- patcher:
type: "ResourceLimitPatcher"
resource: "uc1-kstreams-deployment.yaml"
container: "uc-application"
variableName: "cpu"
value: "1000m"
- patcher:
type: "ResourceLimitPatcher"
resource: "uc1-kstreams-deployment.yaml"
container: "uc-application"
variableName: "memory"
value: "2Gi"
\ No newline at end of file
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