Skip to content
Snippets Groups Projects
Commit ffb55b4e authored by Benedikt Wetzel's avatar Benedikt Wetzel Committed by Sören Henning
Browse files

Add inital thedilote helm chart

contains only the most important components
parent 441ef33e
No related branches found
No related tags found
1 merge request!60Introduce a Theodolite Helm chart for deploying all dependencies
Showing
with 2567 additions and 0 deletions
# 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/
dependencies:
- name: grafana
repository: https://charts.helm.sh/stable/
version: 5.1.2
- name: kube-prometheus-stack
repository: https://prometheus-community.github.io/helm-charts
version: 12.0.0
- name: cp-helm-charts
repository: file://../dependencies/cp-helm-charts/
version: 0.4.0
- name: kafka-lag-exporter
repository: file://../dependencies/kafka-lag-exporter
version: 0.6.0
digest: sha256:0f58760632d24edbaf98214d89be31d25e769ddfc3558f23afb0c68a6be14cbe
generated: "2020-11-23T13:55:43.726080177+01:00"
apiVersion: v2
name: theodolite
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
dependencies: # A list of the chart requirements (optional)
- name: grafana
version: 5.1.2
repository: https://charts.helm.sh/stable/
condition: grafana.enabled
- name: kube-prometheus-stack
version: 12.0.0
repository: https://prometheus-community.github.io/helm-charts
- name: cp-helm-charts
version: 0.5.0
repository: file://../dependencies/cp-helm-charts/
condition: confluent.enabled
- name: kafka-lag-exporter
version: 0.6.0
repository: file://../dependencies/kafka-lag-exporter
condition: kafka-lag-exporter.enabled
# 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.
appVersion: 0.3.0
File added
File added
File added
File added
This diff is collapsed.
Welcome to Theodolite
Visit https://github.com/cau-se/theodolite for more information
TODO: Add more information
\ No newline at end of file
{{/*
Expand the name of the chart.
*/}}
{{- define "theodolite.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.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.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "theodolite.labels" -}}
helm.sh/chart: {{ include "theodolite.chart" . }}
{{ include "theodolite.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "theodolite.selectorLabels" -}}
app.kubernetes.io/name: {{ include "theodolite.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "theodolite.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "theodolite.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{- if .Values.prometheus.clusterRoleBinding.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: prometheus
subjects:
- kind: ServiceAccount
name: prometheus
namespace: default
{{- end}}
\ No newline at end of file
{{- if .Values.prometheus.clusterRole.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus
rules:
- apiGroups: [""]
resources:
- nodes
- services
- endpoints
- pods
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources:
- configmaps
verbs: ["get"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
{{- end }}
\ No newline at end of file
This diff is collapsed.
{{- if .Values.kafkaClient.enabled -}}
apiVersion: v1
kind: Pod
metadata:
name: kafka-client
spec:
containers:
- name: kafka-client
image: confluentinc/cp-enterprise-kafka:5.4.0
command:
- sh
- -c
- "exec tail -f /dev/null"
{{- end }}
\ No newline at end of file
{{- if .Values.grafana.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: prometheus
labels:
grafana_datasource: "1"
data:
datasource.yaml: |-
# config file version
apiVersion: 1
datasources:
# <string, required> name of the datasource. Required
- name: Prometheus
# <string, required> datasource type. Required
type: prometheus
# <string, required> access mode. proxy or direct (Server or Browser in the UI). Required
access: proxy
# <bool> mark as default datasource. Max one per org
isDefault: true
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string> url
url: http://prometheus-operated:9090 #http://localhost:9090
# <map> fields that will be converted to json and stored in json_data
jsonData:
timeInterval: "15s"
version: 1
# <bool> allow users to edit datasources from the UI.
editable: true
{{- end }}
\ No newline at end of file
{{- if .Values.prometheus.enabled -}}
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: prometheus
spec:
serviceAccountName: prometheus
serviceMonitorSelector:
matchLabels:
#app: cp-kafka
appScope: titan-ccp
resources:
requests:
memory: 400Mi
#scrapeInterval: 1s
enableAdminAPI: true
{{- end}}
\ No newline at end of file
{{- if .Values.prometheus.serviceAccount.enabled -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus
{{- end}}
\ No newline at end of file
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app: cp-kafka
appScope: titan-ccp
name: kafka
spec:
selector:
matchLabels:
app: cp-kafka
endpoints:
- port: metrics
interval: 7s
\ No newline at end of file
# Theodolite default values
###
# Theodolite resources
###
kafkaClient:
enabled: true
namespace: # TODO
####
## configuration of sub charts
###
###
# Grafana
###
grafana:
enabled: true
image:
repository: grafana/grafana
tag: 6.7.3
pullPolicy: IfNotPresent
# Administrator credentials when not using an existing secret (see below)
adminUser: admin
adminPassword: admin
## Sidecars that collect the configmaps with specified label and stores the included files them into the respective folders
## Requires at least Grafana 5 to work and can't be used together with parameters dashboardProviders, datasources and dashboards
sidecar:
image: kiwigrid/k8s-sidecar:0.1.99
imagePullPolicy: IfNotPresent
dashboards:
enabled: true
SCProvider: true
# label that the configmaps with dashboards are marked with
label: grafana_dashboard
# folder in the pod that should hold the collected dashboards (unless `defaultFolderName` is set)
folder: /tmp/dashboards
# The default folder name, it will create a subfolder under the `folder` and put dashboards in there instead
defaultFolderName: null
# If specified, the sidecar will search for dashboard config-maps inside this namespace.
# Otherwise the namespace in which the sidecar is running will be used.
# It's also possible to specify ALL to search in all namespaces
searchNamespace: null
# provider configuration that lets grafana manage the dashboards
provider:
# name of the provider, should be unique
name: sidecarProvider
# orgid as configured in grafana
orgid: 1
# folder in which the dashboards should be imported in grafana
folder: ''
# type of the provider
type: file
# disableDelete to activate a import-only behaviour
disableDelete: false
# allow updating provisioned dashboards from the UI
allowUiUpdates: true
datasources:
enabled: true
# label that the configmaps with datasources are marked with
label: grafana_datasource
# If specified, the sidecar will search for datasource config-maps inside this namespace.
# Otherwise the namespace in which the sidecar is running will be used.
# It's also possible to specify ALL to search in all namespaces
searchNamespace: null
service:
nodePort: 31199
type: NodePort
###
# Confluent Platform
###
cp-helm-charts:
enabled: true
## ------------------------------------------------------
## Zookeeper
## ------------------------------------------------------
cp-zookeeper:
enabled: true
servers: 3 # default: 3
image: confluentinc/cp-zookeeper
imageTag: 5.4.0
## Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace.
## https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
imagePullSecrets:
# - name: "regcred"
heapOptions: "-Xms512M -Xmx512M"
persistence:
enabled: false
resources: {}
## If you do want to specify resources, uncomment the following lines, adjust them as necessary,
## and remove the curly braces after 'resources:'
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
## ------------------------------------------------------
## Kafka
## ------------------------------------------------------
cp-kafka:
enabled: true
brokers: 10 # deauflt: 10
image: confluentinc/cp-enterprise-kafka
imageTag: 5.4.0
## Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace.
## https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
imagePullSecrets:
# - name: "regcred"
heapOptions: "-Xms512M -Xmx512M"
persistence:
enabled: false
resources: {}
## If you do want to specify resources, uncomment the following lines, adjust them as necessary,
## and remove the curly braces after 'resources:'
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
configurationOverrides:
#offsets.topic.replication.factor: 1
"message.max.bytes": "134217728" # 128 MB
"replica.fetch.max.bytes": "134217728" # 128 MB
#default.replication.factor: 1
# "min.insync.replicas": 2
# "auto.create.topics.enable": false
"log.retention.ms": "10000" # 10s
"metrics.sample.window.ms": "5000" #5s
"advertised.listeners": |-
EXTERNAL://${HOST_IP}:$((31090 + ${KAFKA_BROKER_ID}))
"listener.security.protocol.map": |-
PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT
nodeport:
enabled: false
servicePort: 19092
firstListenerPort: 31090
## ------------------------------------------------------
## Schema Registry
## ------------------------------------------------------
cp-schema-registry:
enabled: true
image: confluentinc/cp-schema-registry
imageTag: 5.4.0
## Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace.
## https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
imagePullSecrets:
# - name: "regcred"
heapOptions: "-Xms512M -Xmx512M"
resources: {}
external:
enabled: true
type: NodePort
servicePort: 8081
nodePort: 30099 # davor wars 1 konflikt mit kafka 31091
annotations: {}
## If you do want to specify resources, uncomment the following lines, adjust them as necessary,
## and remove the curly braces after 'resources:'
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
cp-kafka-rest:
enabled: false
cp-kafka-connect:
enabled: false
cp-ksql-server:
enabled: false
cp-control-center:
enabled: false
###
# Kafka Lag Exporter
###
kafka-lag-exporter:
enabled: true
clusters:
- name: "my-confluent-cp-kafka"
bootstrapBrokers: "my-confluent-cp-kafka:9092"
## The interval between refreshing metrics
pollIntervalSeconds: 15
prometheus:
serviceMonitor:
enabled: true
interval: "5s"
additionalLabels:
appScope: titan-ccp
###
# Prometheus Monitoring Stack (Prometheus Operator)
###
kube-prometheus-stack:
commonLabels:
appScope: titan-ccp
alertmanager:
enabled: false
grafana:
enabled: false
kubeApiServer:
enabled: false
kubelet:
enabled: false
kubeControllerManager:
enabled: false
coreDns:
enabled: false
kubeDns:
enabled: false
kubeEtcd:
enabled: false
kubeScheduler:
enabled: false
kubeProxy:
enabled: false
kubeStateMetrics:
enabled: false
nodeExporter:
enabled: false
prometheusOperator:
enabled: true
prometheus:
enabled: false
###
# Prometheus
###
prometheus:
enabled: true
# depends on your cluster security and permission settings, you may need to create the following resources
serviceAccount:
enabled: true
clusterRole:
enabled: true
clusterRoleBinding:
enabled: true
\ No newline at end of file
# 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/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment