diff --git a/execution/helm/theodolite-infrastructure/.helmignore b/execution/helm/.helmignore similarity index 100% rename from execution/helm/theodolite-infrastructure/.helmignore rename to execution/helm/.helmignore diff --git a/execution/helm/theodolite-infrastructure/Chart.yaml b/execution/helm/Chart.yaml similarity index 100% rename from execution/helm/theodolite-infrastructure/Chart.yaml rename to execution/helm/Chart.yaml diff --git a/execution/helm/theodolite-infrastructure/README.md b/execution/helm/README.md similarity index 86% rename from execution/helm/theodolite-infrastructure/README.md rename to execution/helm/README.md index 4cacd06c8181970e78cb4f62e93b77fa169fcdfa..86d760ec55d1a4dd95052e96023ce681cc04f6f4 100644 --- a/execution/helm/theodolite-infrastructure/README.md +++ b/execution/helm/README.md @@ -44,6 +44,21 @@ In development environments Kubernetes resources are often low. To reduce resour 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 this CRDs with: + +```sh +kubectl delete crd execution +kubectl delete crd benchmark +``` + ## Development **Hints**: diff --git a/execution/helm/theodolite-infrastructure/build-package.sh b/execution/helm/build-package.sh similarity index 100% rename from execution/helm/theodolite-infrastructure/build-package.sh rename to execution/helm/build-package.sh diff --git a/execution/helm/theodolite-infrastructure/preconfigs/one-broker-values.yaml b/execution/helm/preconfigs/one-broker-values.yaml similarity index 92% rename from execution/helm/theodolite-infrastructure/preconfigs/one-broker-values.yaml rename to execution/helm/preconfigs/one-broker-values.yaml index fdbc3207ee37f49cf176645851d91e62ba354d28..c53c1f1eb8bc7a17f192d70a6f10f8cacc09c98f 100644 --- a/execution/helm/theodolite-infrastructure/preconfigs/one-broker-values.yaml +++ b/execution/helm/preconfigs/one-broker-values.yaml @@ -9,7 +9,7 @@ cp-helm-charts: ## Kafka ## ------------------------------------------------------ cp-kafka: - brokers: 1 # deauflt: 10 + brokers: 1 # default: 10 configurationOverrides: offsets.topic.replication.factor: "1" \ No newline at end of file diff --git a/execution/helm/theodolite-infrastructure/templates/NOTES.txt b/execution/helm/templates/NOTES.txt similarity index 100% rename from execution/helm/theodolite-infrastructure/templates/NOTES.txt rename to execution/helm/templates/NOTES.txt diff --git a/execution/helm/theodolite-infrastructure/templates/_helpers.tpl b/execution/helm/templates/_helpers.tpl similarity index 100% rename from execution/helm/theodolite-infrastructure/templates/_helpers.tpl rename to execution/helm/templates/_helpers.tpl diff --git a/execution/helm/theodolite-infrastructure/templates/cluster-role-binding.yaml b/execution/helm/templates/cluster-role-binding.yaml similarity index 100% rename from execution/helm/theodolite-infrastructure/templates/cluster-role-binding.yaml rename to execution/helm/templates/cluster-role-binding.yaml diff --git a/execution/helm/theodolite-infrastructure/templates/cluster-role.yaml b/execution/helm/templates/cluster-role.yaml similarity index 100% rename from execution/helm/theodolite-infrastructure/templates/cluster-role.yaml rename to execution/helm/templates/cluster-role.yaml diff --git a/execution/helm/theodolite-infrastructure/templates/dashboard-config-map.yaml b/execution/helm/templates/dashboard-config-map.yaml similarity index 100% rename from execution/helm/theodolite-infrastructure/templates/dashboard-config-map.yaml rename to execution/helm/templates/dashboard-config-map.yaml diff --git a/execution/helm/theodolite-infrastructure/templates/kafka-client.yaml b/execution/helm/templates/kafka-client.yaml similarity index 100% rename from execution/helm/theodolite-infrastructure/templates/kafka-client.yaml rename to execution/helm/templates/kafka-client.yaml diff --git a/execution/helm/theodolite-infrastructure/templates/prometheus-datasource-config-map.yaml b/execution/helm/templates/prometheus-datasource-config-map.yaml similarity index 100% rename from execution/helm/theodolite-infrastructure/templates/prometheus-datasource-config-map.yaml rename to execution/helm/templates/prometheus-datasource-config-map.yaml diff --git a/execution/helm/theodolite-infrastructure/templates/prometheus.yaml b/execution/helm/templates/prometheus.yaml similarity index 100% rename from execution/helm/theodolite-infrastructure/templates/prometheus.yaml rename to execution/helm/templates/prometheus.yaml diff --git a/execution/helm/theodolite-infrastructure/templates/service-account.yaml b/execution/helm/templates/service-account.yaml similarity index 100% rename from execution/helm/theodolite-infrastructure/templates/service-account.yaml rename to execution/helm/templates/service-account.yaml diff --git a/execution/helm/theodolite-infrastructure/templates/service-monitor.yaml b/execution/helm/templates/service-monitor.yaml similarity index 100% rename from execution/helm/theodolite-infrastructure/templates/service-monitor.yaml rename to execution/helm/templates/service-monitor.yaml diff --git a/execution/helm/theodolite-infrastructure/templates/tests/test-connection.yaml b/execution/helm/templates/tests/test-connection.yaml similarity index 100% rename from execution/helm/theodolite-infrastructure/templates/tests/test-connection.yaml rename to execution/helm/templates/tests/test-connection.yaml diff --git a/execution/helm/theodolite-operator/templates/benchmarkCRD.yaml b/execution/helm/templates/theodolite/benchmarkCRD.yaml similarity index 84% rename from execution/helm/theodolite-operator/templates/benchmarkCRD.yaml rename to execution/helm/templates/theodolite/benchmarkCRD.yaml index 9d7468b490fa2f2a6cf829bdcafab8c4bd6fc5bf..51881dfd6d18521f3fe391c6cb60e8b0ac432f12 100644 --- a/execution/helm/theodolite-operator/templates/benchmarkCRD.yaml +++ b/execution/helm/templates/theodolite/benchmarkCRD.yaml @@ -1,4 +1,4 @@ -{{- if .Values.benchmarkCRD.create -}} +{{- if .Values.theodolite.benchmarkCRD.create -}} apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: diff --git a/execution/helm/theodolite-operator/templates/executionCRD.yaml b/execution/helm/templates/theodolite/executionCRD.yaml similarity index 84% rename from execution/helm/theodolite-operator/templates/executionCRD.yaml rename to execution/helm/templates/theodolite/executionCRD.yaml index 73b58397b8c1fc15ffef5da74e8f1dbdabaa3a30..66e9a940e934b5629a6139b535c7b0d479f329d7 100644 --- a/execution/helm/theodolite-operator/templates/executionCRD.yaml +++ b/execution/helm/templates/theodolite/executionCRD.yaml @@ -1,4 +1,4 @@ -{{- if .Values.executionCRD.create -}} +{{- if .Values.theodolite.executionCRD.create -}} apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: diff --git a/execution/helm/templates/theodolite/role-binding.yaml b/execution/helm/templates/theodolite/role-binding.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5a4987146175a5c2d8ff0d8c2c97dc8d38cda54b --- /dev/null +++ b/execution/helm/templates/theodolite/role-binding.yaml @@ -0,0 +1,15 @@ +{{- if .Values.theodolite.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 diff --git a/execution/helm/theodolite-operator/templates/role.yaml b/execution/helm/templates/theodolite/role.yaml similarity index 89% rename from execution/helm/theodolite-operator/templates/role.yaml rename to execution/helm/templates/theodolite/role.yaml index aaa7dec3344ebaf9831f2f18e878412d02d52ca8..6cfedd220865543996afb1c378a9f93e911ec87d 100644 --- a/execution/helm/theodolite-operator/templates/role.yaml +++ b/execution/helm/templates/theodolite/role.yaml @@ -1,8 +1,8 @@ -{{- if .Values.rbac.create -}} +{{- if .Values.theodolite.rbac.create -}} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: {{ include "theodolite-operator.fullname" . }} + name: {{ include "theodolite.fullname" . }} rules: - apiGroups: - apps diff --git a/execution/helm/templates/theodolite/serviceaccount.yaml b/execution/helm/templates/theodolite/serviceaccount.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cf06ad712e48ab712d65330fa24762b6a84c3b7b --- /dev/null +++ b/execution/helm/templates/theodolite/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.theodolite.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "theodolite.serviceAccountName" . }} + labels: + {{- include "theodolite.labels" . | nindent 4 }} + {{- with .Values.theodolite.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} \ No newline at end of file diff --git a/execution/helm/theodolite-operator/templates/thedolite-operator.yaml b/execution/helm/templates/theodolite/thedolite-operator.yaml similarity index 52% rename from execution/helm/theodolite-operator/templates/thedolite-operator.yaml rename to execution/helm/templates/theodolite/thedolite-operator.yaml index 29feed5adbbd7e91f9cc53499162d4b793c938b8..d53d9d0b3791e453f4a604c09cb236a514722436 100644 --- a/execution/helm/theodolite-operator/templates/thedolite-operator.yaml +++ b/execution/helm/templates/theodolite/thedolite-operator.yaml @@ -1,26 +1,26 @@ -{{- if .Values.operator.enabled -}} +{{- if .Values.theodolite.operator.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "theodolite-operator.fullname" . }} + name: {{ include "theodolite.fullname" . }} spec: selector: matchLabels: - app: {{ include "theodolite-operator.fullname" . }} + app: {{ include "theodolite.fullname" . }} replicas: 1 template: metadata: labels: - app: {{ include "theodolite-operator.fullname" . }} + app: {{ include "theodolite.fullname" . }} spec: terminationGracePeriodSeconds: 0 - serviceAccountName: {{ include "theodolite-operator.serviceAccountName" . }} + serviceAccountName: {{ include "theodolite.serviceAccountName" . }} containers: - name: theodolite - image: lorenzboguhn/thedolite:latest + image: lorenzboguhn/theodolite:latest env: - name: NAMESPACE - value: {{ .Values.operator.namespace}} + value: {{ .Values.theodolite.operator.namespace}} - name: lag-analysis image: benediktwetzel/lag-analysis ports: diff --git a/execution/helm/theodolite-operator/.helmignore b/execution/helm/theodolite-operator/.helmignore deleted file mode 100644 index 0e8a0eb36f4ca2c939201c0d54b5d82a1ea34778..0000000000000000000000000000000000000000 --- a/execution/helm/theodolite-operator/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/execution/helm/theodolite-operator/Chart.yaml b/execution/helm/theodolite-operator/Chart.yaml deleted file mode 100644 index 3e029303c7e5f551eef0aa4b440d97f5a2f057ff..0000000000000000000000000000000000000000 --- a/execution/helm/theodolite-operator/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v2 -name: theodolite-operator -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "1.16.0" diff --git a/execution/helm/theodolite-operator/templates/NOTES.txt b/execution/helm/theodolite-operator/templates/NOTES.txt deleted file mode 100644 index 495545db9e73aec2f83e06c4688c81856a76169f..0000000000000000000000000000000000000000 --- a/execution/helm/theodolite-operator/templates/NOTES.txt +++ /dev/null @@ -1,5 +0,0 @@ -Welcome to Theodolite! - -This is the Theodolite operator. Deploy executions and benchmarks to start benchmarks. - -Visit https://cau-se.github.io/theodolite for getting started and more information. diff --git a/execution/helm/theodolite-operator/templates/_helpers.tpl b/execution/helm/theodolite-operator/templates/_helpers.tpl deleted file mode 100644 index a495f0e81d1bf3afc5399ef500a3ff6c2c0e7fc4..0000000000000000000000000000000000000000 --- a/execution/helm/theodolite-operator/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "theodolite-operator.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "theodolite-operator.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "theodolite-operator.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "theodolite-operator.labels" -}} -helm.sh/chart: {{ include "theodolite-operator.chart" . }} -{{ include "theodolite-operator.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "theodolite-operator.selectorLabels" -}} -app.kubernetes.io/name: {{ include "theodolite-operator.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "theodolite-operator.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "theodolite-operator.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/execution/helm/theodolite-operator/templates/role-binding.yaml b/execution/helm/theodolite-operator/templates/role-binding.yaml deleted file mode 100644 index ee13c45eef973c0d2713ef56a5d03ca205985994..0000000000000000000000000000000000000000 --- a/execution/helm/theodolite-operator/templates/role-binding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: {{ include "theodolite-operator.fullname" . }} - labels: - app: {{ include "theodolite-operator.name" . }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ include "theodolite-operator.fullname" . }} -subjects: -- kind: ServiceAccount - name: {{ include "theodolite-operator.serviceAccountName" . }} -{{- end }} \ No newline at end of file diff --git a/execution/helm/theodolite-operator/templates/serviceaccount.yaml b/execution/helm/theodolite-operator/templates/serviceaccount.yaml deleted file mode 100644 index 5f65969320e7bc62701a8c1485390559cb5e1a00..0000000000000000000000000000000000000000 --- a/execution/helm/theodolite-operator/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "theodolite-operator.serviceAccountName" . }} - labels: - {{- include "theodolite-operator.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/execution/helm/theodolite-operator/values.yaml b/execution/helm/theodolite-operator/values.yaml deleted file mode 100644 index b0f8cc0bfbbe42a83f2ded8f0e1d8e441381e46d..0000000000000000000000000000000000000000 --- a/execution/helm/theodolite-operator/values.yaml +++ /dev/null @@ -1,15 +0,0 @@ -operator: - enabled: true - namespace: "default" - -executionCRD: - create: true - -benchmarkCRD: - create: true - -serviceAccount: - create: true - -rbac: - create: true \ No newline at end of file diff --git a/execution/helm/theodolite-infrastructure/update-index.sh b/execution/helm/update-index.sh similarity index 100% rename from execution/helm/theodolite-infrastructure/update-index.sh rename to execution/helm/update-index.sh diff --git a/execution/helm/theodolite-infrastructure/values.yaml b/execution/helm/values.yaml similarity index 95% rename from execution/helm/theodolite-infrastructure/values.yaml rename to execution/helm/values.yaml index d35912de6ffc72fff27f5d389c94761bc80eecd1..ed820eec13ce9c6196cd42a0cacd04d4cf625710 100644 --- a/execution/helm/theodolite-infrastructure/values.yaml +++ b/execution/helm/values.yaml @@ -226,4 +226,24 @@ prometheus: clusterRole: enabled: true clusterRoleBinding: - enabled: true \ No newline at end of file + enabled: true + +### +# Theodolite Operator +### +theodolite: + operator: + enabled: true + namespace: "default" + + executionCRD: + create: true + + benchmarkCRD: + create: true + + serviceAccount: + create: true + + rbac: + create: true \ No newline at end of file