Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions charts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Kafka Streams Bakdata Helm Repository

Collection of commonly used charts associated with bakdata kafka streaming applications.

## Install

```
helm repo add bakdata-common https://raw.githubusercontent.com/bakdata/common-kafka-streams/<branch_name>/charts/
helm install bakdata-common/<chart_to_install>
```

## Development

You can add new charts in a separate folder or update existing ones. To update the helm repository please run:

```
helm repo index . --merge <your-chart>
```
13 changes: 13 additions & 0 deletions charts/index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
entries:
streams-app:
- apiVersion: v1
created: 2019-04-16T11:19:08.655324+02:00
description: A helm chart for deploying a kafka streams application based on the
bakdata KafkaStreamsApplication template.
digest: d4b1ffad8da8fc2150ff52ce84d9e7ebca7a1ec742cff07b3885b7b47d9e1d00
name: streams-app
urls:
- ./streams-app/streams-app-0.1.0.tgz
version: 0.1.0
generated: 2019-04-16T11:19:08.654593+02:00
4 changes: 4 additions & 0 deletions charts/streams-app/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
name: streams-app
description: A helm chart for deploying a kafka streams application based on the bakdata KafkaStreamsApplication template.
version: 0.1.0
Binary file added charts/streams-app/streams-app-0.1.0.tgz
Binary file not shown.
33 changes: 33 additions & 0 deletions charts/streams-app/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{/* vim: set filetype=mustache: */}}
Comment thread
fapaul marked this conversation as resolved.
{{/*
Expand the name of the chart.
*/}}
{{- define "streams-app.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 "streams-app.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 "streams-app.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
41 changes: 41 additions & 0 deletions charts/streams-app/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "streams-app.fullname" . }}
labels:
app: {{ template "streams-app.name" . }}
chart: {{ template "streams-app.chart" . }}
release: {{ .Release.Name }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "streams-app.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "streams-app.name" . }}
release: {{ .Release.Name }}
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- {{ template "streams-app.name" . }}
topologyKey: "kubernetes.io/hostname"
containers:
- name: {{ template "streams-app.name" . }}-container
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
env:
- name: ENV_PREFIX
value: {{ .Values.configurationEnvPrefix }}
{{- range $key, $value := .Values.env }}
- name: {{ $key | quote }}
value: {{ $value | quote }}
{{- end }}
18 changes: 18 additions & 0 deletions charts/streams-app/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
nameOverride: bakdataStreamsApp

replicaCount: 1

image: streamsApp
imageTag: latest
imagePullPolicy: Always

configurationEnvPrefix: "APP_"

env:
APP_INPUT_TOPIC: "test"
APP_OUTPUT_TOPIC: "test"
APP_BROKERS: "test:9092"
APP_ROOT_TAG: "root"
APP_OUTPUT_SCHEMA: "/test/schema"
APP_SCHEMA_REGISTRY_URL: "url:1234"