Skip to content
Snippets Groups Projects
Commit ae2c0b36 authored by Simon Ehrenstein's avatar Simon Ehrenstein
Browse files

Merge branch 'theodolite-kotlin' of git.se.informatik.uni-kiel.de:she/spesb into theodolite-kotlin

parents c6f114cb 5ac54e1b
No related branches found
No related tags found
3 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
Showing
with 245 additions and 14 deletions
...@@ -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:
......
...@@ -98,7 +98,7 @@ kubectl apply -f infrastructure/kafka/service-monitor.yaml ...@@ -98,7 +98,7 @@ kubectl apply -f infrastructure/kafka/service-monitor.yaml
Other Kafka deployments, for example, using Strimzi, should work in a similar way. Other Kafka deployments, for example, using Strimzi, should work in a similar way.
*Please note that currently, even if installed differently, the corresponding services must run at *Please note that currently, even if installed differently, the corresponding services must run at
*my-confluent-cp-kafka:9092*, *my-confluent-cp-zookeeper:2181* and *my-confluent-cp-schema-registry:8081*. `my-confluent-cp-kafka:9092`, `my-confluent-cp-zookeeper:2181` and `my-confluent-cp-schema-registry:8081`.*
#### A Kafka Client Pod #### A Kafka Client Pod
......
...@@ -44,6 +44,31 @@ In development environments Kubernetes resources are often low. To reduce resour ...@@ -44,6 +44,31 @@ In development environments Kubernetes resources are often low. To reduce resour
helm install theodolite . -f preconfigs/one-broker-values.yaml helm install theodolite . -f preconfigs/one-broker-values.yaml
``` ```
## Uninstall this Chart
To uninstall/delete the `my-release` deployment:
```sh
helm delete my-release
```
This command does not remove the CRDs which are created by this chart. Remove them manually with:
```sh
# CRDs from Theodolite
kubectl delete crd execution
kubectl delete crd benchmark
# 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
**Hints**: **Hints**:
......
...@@ -9,7 +9,7 @@ cp-helm-charts: ...@@ -9,7 +9,7 @@ cp-helm-charts:
## Kafka ## Kafka
## ------------------------------------------------------ ## ------------------------------------------------------
cp-kafka: cp-kafka:
brokers: 1 # deauflt: 10 brokers: 1 # default: 10
configurationOverrides: configurationOverrides:
offsets.topic.replication.factor: "1" offsets.topic.replication.factor: "1"
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: scalability name: {{ template "theodolite.fullname" . }}-grafana-scalability
labels: labels:
grafana_dashboard: "1" grafana_dashboard: "1"
data: data:
......
...@@ -3,7 +3,7 @@ apiVersion: v1 ...@@ -3,7 +3,7 @@ apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
# name: {{ template "theodolite.fullname" . }}-kafka-client # name: {{ template "theodolite.fullname" . }}-kafka-client
name: kafka-client name: {{ template "theodolite.fullname" . }}-kafka-client
spec: spec:
containers: containers:
- name: kafka-client - name: kafka-client
......
...@@ -5,7 +5,7 @@ metadata: ...@@ -5,7 +5,7 @@ metadata:
labels: labels:
app: cp-kafka app: cp-kafka
appScope: titan-ccp appScope: titan-ccp
name: kafka name: {{ template "theodolite.fullname" . }}-cp-kafka
spec: spec:
selector: selector:
matchLabels: matchLabels:
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding kind: ClusterRoleBinding
metadata: metadata:
name: prometheus name: {{ template "theodolite.fullname" . }}-prometheus
roleRef: roleRef:
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io
kind: ClusterRole kind: ClusterRole
name: prometheus name: {{ template "theodolite.fullname" . }}-prometheus
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: prometheus name: {{ template "theodolite.fullname" . }}-prometheus
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end}} {{- end}}
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole kind: ClusterRole
metadata: metadata:
name: prometheus name: {{ template "theodolite.fullname" . }}-prometheus
rules: rules:
- apiGroups: [""] - apiGroups: [""]
resources: resources:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: prometheus name: {{ template "theodolite.fullname" . }}-prometheus
labels: labels:
grafana_datasource: "1" grafana_datasource: "1"
data: data:
......
...@@ -4,7 +4,7 @@ kind: Prometheus ...@@ -4,7 +4,7 @@ kind: Prometheus
metadata: metadata:
name: {{ template "theodolite.fullname" . }}-prometheus name: {{ template "theodolite.fullname" . }}-prometheus
spec: spec:
serviceAccountName: prometheus serviceAccountName: {{ template "theodolite.fullname" . }}-prometheus
serviceMonitorSelector: serviceMonitorSelector:
matchLabels: matchLabels:
#app: cp-kafka #app: cp-kafka
......
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: prometheus name: {{ template "theodolite.fullname" . }}-prometheus
{{- end}} {{- end}}
\ No newline at end of file
{{- if .Values.benchmarkCRD.create -}}
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: benchmarks.theodolite.com
spec:
group: theodolite.com
version: v1alpha1
names:
kind: benchmark
plural: benchmarks
scope: Namespaced
subresources:
status: {}
{{- end }}
\ No newline at end of file
{{- if .Values.executionCRD.create -}}
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: executions.theodolite.com
spec:
group: theodolite.com
version: v1alpha1
names:
kind: execution
plural: executions
scope: Namespaced
subresources:
status: {}
{{- end }}
\ No newline at end of file
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: {{ include "theodolite.fullname" . }}
labels:
app: {{ include "theodolite.name" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "theodolite.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ include "theodolite.serviceAccountName" . }}
{{- end }}
\ No newline at end of file
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "theodolite.fullname" . }}
rules:
- apiGroups:
- apps
resources:
- deployments
verbs:
- delete
- list
- get
- create
- update
- apiGroups:
- ""
resources:
- services
- pods
- configmaps
verbs:
- update
- delete
- list
- get
- create
- apiGroups:
- ""
resources:
- pods/exec
verbs:
- create
- get
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- update
- delete
- list
- create
{{- if .Values.operator.enabled -}}
- apiGroups:
- theodolite.com
resources:
- executions
- benchmarks
verbs:
- delete
- list
- get
- create
- watch
- update
- patch
{{- end }}
{{- end }}
\ No newline at end of file
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "theodolite.serviceAccountName" . }}
labels:
{{- include "theodolite.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
\ No newline at end of file
{{- if .Values.operator.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "theodolite.fullname" . }}-operator
spec:
selector:
matchLabels:
app: {{ include "theodolite.fullname" . }}
replicas: 1
template:
metadata:
labels:
app: {{ include "theodolite.fullname" . }}
spec:
terminationGracePeriodSeconds: 0
serviceAccountName: {{ include "theodolite.serviceAccountName" . }}
containers:
- name: theodolite
image: ghcr.io/cau-se/theodolite:theodolite-kotlin-latest
env:
- name: NAMESPACE
value: {{ .Release.Namespace }}
- name: MODE
value: operator
- name: lag-analysis
image: ghcr.io/cau-se/theodolite-slo-checker-lag-trend:theodolite-kotlin-latest
ports:
- containerPort: 80
name: analysis
{{- end }}
...@@ -227,3 +227,21 @@ prometheus: ...@@ -227,3 +227,21 @@ prometheus:
enabled: true enabled: true
clusterRoleBinding: clusterRoleBinding:
enabled: true enabled: true
###
# Theodolite Operator
###
operator:
enabled: true
executionCRD:
create: true
benchmarkCRD:
create: true
serviceAccount:
create: true
rbac:
create: true
...@@ -39,3 +39,17 @@ rules: ...@@ -39,3 +39,17 @@ rules:
- delete - delete
- list - list
- create - create
- apiGroups:
- theodolite.com
resources:
- executions
- benchmarks
verbs:
- delete
- list
- get
- create
- watch
- update
- patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment