Skip to content
Snippets Groups Projects
Commit bb41bd6c authored by Sören Henning's avatar Sören Henning
Browse files

Merge branch 'theodolite-kotlin' into start-using-defaults-issue-191

parents b1b334e7 85430ede
No related branches found
No related tags found
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!115Start using new Theodolite defaults,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
Pipeline #2709 passed
...@@ -303,6 +303,32 @@ deploy-theodolite: ...@@ -303,6 +303,32 @@ deploy-theodolite:
allow_failure: true allow_failure: true
# Theodolite SLO Checker: Lag Trend
deploy-slo-checker-lag-trend:
stage: deploy
extends:
- .dind
script:
- DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//')
- docker build --pull -t theodolite-slo-checker-lag-trend slope-evaluator
- "[ ! $CI_COMMIT_TAG ] && docker tag theodolite-slo-checker-lag-trend $CR_HOST/$CR_ORG/theodolite-slo-checker-lag-trend:${DOCKER_TAG_NAME}latest"
- "[ $CI_COMMIT_TAG ] && docker tag theodolite-slo-checker-lag-trend $CR_HOST/$CR_ORG/theodolite-slo-checker-lag-trend:$CI_COMMIT_TAG"
- echo $CR_PW | docker login $CR_HOST -u $CR_USER --password-stdin
- docker push $CR_HOST/$CR_ORG/theodolite-slo-checker-lag-trend
- docker logout
rules:
- if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW && $CI_COMMIT_TAG"
when: always
- changes:
- slope-evaluator/**/*
if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW"
when: always
- if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW"
when: manual
allow_failure: true
# Theodolite Random Scheduler # Theodolite Random Scheduler
deploy-random-scheduler: deploy-random-scheduler:
......
...@@ -50,11 +50,21 @@ To uninstall/delete the `theodolite` deployment: ...@@ -50,11 +50,21 @@ To uninstall/delete the `theodolite` deployment:
helm delete theodolite helm delete theodolite
``` ```
This command does not remove the CRDs which are created by this Chart. Remove this CRDs with: This command does not remove the CRDs which are created by this chart. Remove them manually with:
```sh ```sh
# CRDs from Theodolite
kubectl delete crd executions.theodolite.com kubectl delete crd executions.theodolite.com
kubectl delete crd benchmarks.theodolite.com kubectl delete crd benchmarks.theodolite.com
# CRDs from Prometheus operator (see https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack#uninstall-chart)
kubectl delete crd alertmanagerconfigs.monitoring.coreos.com
kubectl delete crd alertmanagers.monitoring.coreos.com
kubectl delete crd podmonitors.monitoring.coreos.com
kubectl delete crd probes.monitoring.coreos.com
kubectl delete crd prometheuses.monitoring.coreos.com
kubectl delete crd prometheusrules.monitoring.coreos.com
kubectl delete crd servicemonitors.monitoring.coreos.com
kubectl delete crd thanosrulers.monitoring.coreos.com
``` ```
## Development ## Development
......
...@@ -17,14 +17,14 @@ spec: ...@@ -17,14 +17,14 @@ spec:
serviceAccountName: {{ include "theodolite.serviceAccountName" . }} serviceAccountName: {{ include "theodolite.serviceAccountName" . }}
containers: containers:
- name: theodolite - name: theodolite
image: lorenzboguhn/thedolite:latest image: ghcr.io/cau-se/theodolite:theodolite-kotlin-latest
env: env:
- name: NAMESPACE - name: NAMESPACE
value: {{ .Release.Namespace }} value: {{ .Release.Namespace }}
- name: MODE - name: MODE
value: operator value: operator
- name: lag-analysis - name: lag-analysis
image: benediktwetzel/lag-analysis image: ghcr.io/cau-se/theodolite-slo-checker-lag-trend:theodolite-kotlin-latest
ports: ports:
- containerPort: 80 - containerPort: 80
name: analysis name: analysis
......
...@@ -16,7 +16,7 @@ spec: ...@@ -16,7 +16,7 @@ spec:
serviceAccountName: theodolite serviceAccountName: theodolite
containers: containers:
- name: thedolite - name: thedolite
image: lorenzboguhn/thedolite:latest image: ghcr.io/cau-se/theodolite:theodolite-kotlin-latest
env: env:
- name: KUBECONFIG - name: KUBECONFIG
value: "~/.kube/config" value: "~/.kube/config"
......
...@@ -21,14 +21,13 @@ class KubernetesBenchmark : Benchmark, CustomResource(), Namespaced { ...@@ -21,14 +21,13 @@ class KubernetesBenchmark : Benchmark, CustomResource(), Namespaced {
lateinit var resourceTypes: List<TypeName> lateinit var resourceTypes: List<TypeName>
lateinit var loadTypes: List<TypeName> lateinit var loadTypes: List<TypeName>
lateinit var kafkaConfig: KafkaConfig lateinit var kafkaConfig: KafkaConfig
val namespace = System.getenv("NAMESPACE") ?: DEFAULT_NAMESPACE private val namespace = System.getenv("NAMESPACE") ?: DEFAULT_NAMESPACE
var path = System.getenv("THEODOLITE_APP_RESOURCES") ?: "./config" var path = System.getenv("THEODOLITE_APP_RESOURCES") ?: "./config"
val client = DefaultKubernetesClient().inNamespace(namespace)
private fun loadKubernetesResources(resources: List<String>): List<Pair<String, KubernetesResource>> { private fun loadKubernetesResources(resources: List<String>): List<Pair<String, KubernetesResource>> {
val parser = YamlParser() val parser = YamlParser()
val loader = K8sResourceLoader(client) val loader = K8sResourceLoader(DefaultKubernetesClient().inNamespace(namespace))
return resources return resources
.map { resource -> .map { resource ->
val resourcePath = "$path/$resource" val resourcePath = "$path/$resource"
...@@ -68,7 +67,7 @@ class KubernetesBenchmark : Benchmark, CustomResource(), Namespaced { ...@@ -68,7 +67,7 @@ class KubernetesBenchmark : Benchmark, CustomResource(), Namespaced {
resources = resources.map { r -> r.second }, resources = resources.map { r -> r.second },
kafkaConfig = hashMapOf("bootstrap.servers" to kafkaConfig.bootstrapServer), kafkaConfig = hashMapOf("bootstrap.servers" to kafkaConfig.bootstrapServer),
topics = kafkaConfig.getKafkaTopics(), topics = kafkaConfig.getKafkaTopics(),
client = client client = DefaultKubernetesClient().inNamespace(namespace)
) )
} }
} }
...@@ -13,7 +13,7 @@ object Main { ...@@ -13,7 +13,7 @@ object Main {
@JvmStatic @JvmStatic
fun main(args: Array<String>) { fun main(args: Array<String>) {
val mode = System.getenv("MODE") ?: "operator" val mode = System.getenv("MODE") ?: "yaml-executor"
logger.info { "Start Theodolite with mode $mode" } logger.info { "Start Theodolite with mode $mode" }
when(mode) { when(mode) {
......
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