Skip to content
Open
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
8 changes: 4 additions & 4 deletions charts/consumer-app-cleanup-job/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common-app
repository: file://../common-app
- name: kafka-app
repository: file://../kafka-app
version: 0.1.0
digest: sha256:bfb2c4a354de9dcac6f2a441aa8462633200eb9eeec2fdbca120b8e3597d62d2
generated: "2025-11-07T16:23:29.649069+01:00"
digest: sha256:5e8276c2722e7e1d58528df277ea76528c31231169ff79a4cb8f59a0e21baed9
generated: "2025-12-01T17:44:37.85691+01:00"
4 changes: 2 additions & 2 deletions charts/consumer-app-cleanup-job/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ maintainers:
email: [email protected]
url: bakdata.com
dependencies:
- name: common-app
- name: kafka-app
version: "0.1.0"
repository: "file://../common-app"
repository: "file://../kafka-app"
2 changes: 1 addition & 1 deletion charts/consumer-app-cleanup-job/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{- include "common-app.configmap" . -}}
{{- include "kafka-app.configmap" . -}}
12 changes: 6 additions & 6 deletions charts/consumer-app-cleanup-job/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "common-app.fullname" . }}
{{- include "common-app.annotations" . }}
name: {{ include "kafka-app.fullname" . }}
{{- include "kafka-app.annotations" . }}
labels:
{{- include "common-app.labels" . | nindent 4 }}
{{- include "kafka-app.labels" . | nindent 4 }}
{{- range $key, $value := .Values.labels }}
{{ $key | quote }}: {{ $value | quote }}
{{- end }}
Expand All @@ -20,7 +20,7 @@ spec:
{{- end }}
{{- end }}
labels:
{{- include "common-app.selectorLabels" . | nindent 8 }}
{{- include "kafka-app.selectorLabels" . | nindent 8 }}
{{- range $key, $value := .Values.podLabels }}
{{ $key }}: {{ $value }}
{{- end }}
Expand Down Expand Up @@ -93,7 +93,7 @@ spec:
- name: "{{ $key }}"
valueFrom:
secretKeyRef:
name: {{ include "common-app.fullname" . }}
name: {{ include "kafka-app.fullname" . }}
key: "{{ $key }}"
{{- end }}
{{- range $key, $value := .Values.secretRefs }}
Expand Down Expand Up @@ -137,7 +137,7 @@ spec:
{{- if .Values.files }}
- name: config
configMap:
name: {{ include "common-app.fullname" . }}
name: {{ include "kafka-app.fullname" . }}
{{- end }}
{{- range .Values.secretFilesRefs }}
- name: {{ .volume }}
Expand Down
2 changes: 1 addition & 1 deletion charts/consumer-app-cleanup-job/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{- include "common-app.secrets" . -}}
{{- include "kafka-app.secrets" . -}}
8 changes: 4 additions & 4 deletions charts/consumer-app/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common-app
repository: file://../common-app
- name: kafka-app
repository: file://../kafka-app
version: 0.1.0
digest: sha256:bfb2c4a354de9dcac6f2a441aa8462633200eb9eeec2fdbca120b8e3597d62d2
generated: "2025-11-07T16:23:28.620151+01:00"
digest: sha256:5e8276c2722e7e1d58528df277ea76528c31231169ff79a4cb8f59a0e21baed9
generated: "2025-12-01T17:44:35.384133+01:00"
4 changes: 2 additions & 2 deletions charts/consumer-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ maintainers:
email: [email protected]
url: bakdata.com
dependencies:
- name: common-app
- name: kafka-app
version: "0.1.0"
repository: "file://../common-app"
repository: "file://../kafka-app"
2 changes: 1 addition & 1 deletion charts/consumer-app/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{- include "common-app.configmap" . -}}
{{- include "kafka-app.configmap" . -}}
18 changes: 9 additions & 9 deletions charts/consumer-app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ kind: StatefulSet
kind: Deployment
{{- end }}
metadata:
name: {{ include "common-app.fullname" . }}
{{- include "common-app.deployment-annotations" . }}
name: {{ include "kafka-app.fullname" . }}
{{- include "kafka-app.deployment-annotations" . }}
labels:
{{- include "common-app.labels" . | nindent 4 }}
{{- include "kafka-app.labels" . | nindent 4 }}
streams-bootstrap/kind: {{ .Chart.Name }}
{{- range $key, $value := .Values.labels }}
{{ $key | quote }}: {{ $value | quote }}
{{- end }}
spec:
{{- if .Values.statefulSet }}
serviceName: {{ include "common-app.fullname" . }}
serviceName: {{ include "kafka-app.fullname" . }}
podManagementPolicy: Parallel
{{- end }}
{{- if (not .Values.autoscaling.enabled) }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "common-app.selectorLabels" . | nindent 6 }}
{{- include "kafka-app.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- if or .Values.podAnnotations .Values.files }}
Expand All @@ -45,7 +45,7 @@ spec:
{{- end }}
{{- end }}
labels:
{{- include "common-app.selectorLabels" . | nindent 8 }}
{{- include "kafka-app.selectorLabels" . | nindent 8 }}
streams-bootstrap/kind: {{ .Chart.Name }}
{{- range $key, $value := .Values.podLabels }}
{{ $key }}: {{ $value }}
Expand Down Expand Up @@ -126,7 +126,7 @@ spec:
- name: "{{ $key }}"
valueFrom:
secretKeyRef:
name: {{ include "common-app.fullname" . }}
name: {{ include "kafka-app.fullname" . }}
key: "{{ $key }}"
{{- end }}
{{- range $key, $value := .Values.secretRefs }}
Expand Down Expand Up @@ -222,12 +222,12 @@ spec:
{{- if .Values.prometheus.jmx.enabled }}
- name: jmx-config
configMap:
name: {{ include "common-app.fullname" . }}-jmx
name: {{ include "kafka-app.fullname" . }}-jmx
{{- end }}
{{- if .Values.files }}
- name: config
configMap:
name: {{ include "common-app.fullname" . }}
name: {{ include "kafka-app.fullname" . }}
{{- end }}
{{- range .Values.secretFilesRefs }}
- name: {{ .volume }}
Expand Down
2 changes: 1 addition & 1 deletion charts/consumer-app/templates/jmx-configmap.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{- include "common-app.jmx-configmap" . -}}
{{- include "kafka-app.jmx-configmap" . -}}
2 changes: 1 addition & 1 deletion charts/consumer-app/templates/scaled-object.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{- include "common-app.scaled-object" . -}}
{{- include "kafka-app.scaled-object" . -}}
2 changes: 1 addition & 1 deletion charts/consumer-app/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{- include "common-app.secrets" . -}}
{{- include "kafka-app.secrets" . -}}
2 changes: 1 addition & 1 deletion charts/consumer-app/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{- include "common-app.service" . -}}
{{- include "kafka-app.service" . -}}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: common-app
name: kafka-app
description: A common library chart for Kafka applications.
type: library
version: 0.1.0
Expand Down
30 changes: 15 additions & 15 deletions charts/common-app/README.md → charts/kafka-app/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# common-app library helm chart
# kafka-app library helm chart

This is a **library chart** used to provide common, reusable templates for Kafka applications.

Expand All @@ -14,67 +14,67 @@ type: application
version: 0.1.0

dependencies:
- name: common-app
- name: kafka-app
version: "0.1.0"
repository: "file://../common-app" # Or an HTTP repository
repository: "file://../kafka-app" # Or an HTTP repository
```
You can then include the library's templates in your own templates/ files. The library templates will be rendered using the values from your application's values.yaml file.

## Available Templates

You can include any of the following templates in your application chart.

### `common-app.deployment`
### `kafka-app.deployment`
Renders the main `Deployment` for the application.
* **Enabled by:** `.Values.deployment: true`.
* **Usage (`templates/deployment.yaml`):**
```yaml
{{- include "common-app.deployment" . -}}
{{- include "kafka-app.deployment" . -}}
```


### `common-app.service`
### `kafka-app.service`
Renders a `Service` to expose the application.
* **Enabled by:** `.Values.service.enabled: true`.
* **Usage (`templates/service.yaml`):**
```yaml
{{- include "common-app.service" . -}}
{{- include "kafka-app.service" . -}}
```


### `common-app.scaled-object`
### `kafka-app.scaled-object`
Renders a KEDA `ScaledObject` for autoscaling.
* **Enabled by:** `.Values.autoscaling.enabled: true`.
* **Usage (`templates/scaled-object.yaml`):**
```yaml
{{- include "common-app.scaled-object" . -}}
{{- include "kafka-app.scaled-object" . -}}
```


### `common-app.configmap`
### `kafka-app.configmap`
Renders a `ConfigMap` for mounting files specified in `.Values.files`.
* **Enabled by:** Providing values under the `.Values.files` key.
* **Usage (`templates/configmap.yaml`):**
```yaml
{{- include "common-app.configmap" . -}}
{{- include "kafka-app.configmap" . -}}
```


### `common-app.secrets`
### `kafka-app.secrets`
Renders a `Secret` for populating environment variables from `.Values.secrets`.
* **Enabled by:** Providing values under the `.Values.secrets` key.
* **Usage (`templates/secrets.yaml`):**
```yaml
{{- include "common-app.secrets" . -}}
{{- include "kafka-app.secrets" . -}}
```


### `common-app.jmx-configmap`
### `kafka-app.jmx-configmap`
Renders a `ConfigMap` for the Prometheus JMX exporter sidecar.
* **Enabled by:** `.Values.prometheus.jmx.enabled: true`.
* **Usage (`templates/jmx-configmap.yaml`):**
```yaml
{{- include "common-app.jmx-configmap" . -}}
{{- include "kafka-app.jmx-configmap" . -}}
```

## Configurations This Library Uses
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{- define "common-app.configmap" -}}
{{- define "kafka-app.configmap" -}}
{{ if .Values.files }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common-app.fullname" . }}
{{- include "common-app.annotations" . }}
name: {{ include "kafka-app.fullname" . }}
{{- include "kafka-app.annotations" . }}
labels:
{{- include "common-app.labels" . | nindent 4 }}
{{- include "kafka-app.labels" . | nindent 4 }}
{{- range $key, $value := .Values.labels }}
{{ $key | quote }}: {{ $value | quote }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- define "common-app.deployment" -}}
{{- define "kafka-app.deployment" -}}
{{- $root := . -}}
{{- if and .Values.persistence.enabled (not .Values.persistence.size) }}
{{- fail "When persistence is enabled, you must set .Values.persistence.size" }}
Expand All @@ -15,25 +15,25 @@ kind: StatefulSet
kind: Deployment
{{- end }}
metadata:
name: {{ include "common-app.fullname" . }}
{{- include "common-app.deployment-annotations" . }}
name: {{ include "kafka-app.fullname" . }}
{{- include "kafka-app.deployment-annotations" . }}
labels:
{{- include "common-app.labels" . | nindent 4 }}
{{- include "kafka-app.labels" . | nindent 4 }}
streams-bootstrap/kind: {{ .Chart.Name }}
{{- range $key, $value := .Values.labels }}
{{ $key | quote }}: {{ $value | quote }}
{{- end }}
spec:
{{- if .Values.statefulSet }}
serviceName: {{ include "common-app.fullname" . }}
serviceName: {{ include "kafka-app.fullname" . }}
podManagementPolicy: Parallel
{{- end }}
{{- if (not .Values.autoscaling.enabled) }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "common-app.selectorLabels" . | nindent 6 }}
{{- include "kafka-app.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- if or .Values.podAnnotations .Values.files }}
Expand All @@ -46,7 +46,7 @@ spec:
{{- end }}
{{- end }}
labels:
{{- include "common-app.selectorLabels" . | nindent 8 }}
{{- include "kafka-app.selectorLabels" . | nindent 8 }}
streams-bootstrap/kind: {{ .Chart.Name }}
{{- range $key, $value := .Values.podLabels }}
{{ $key }}: {{ $value }}
Expand Down Expand Up @@ -153,7 +153,7 @@ spec:
- name: "{{ $key }}"
valueFrom:
secretKeyRef:
name: {{ include "common-app.fullname" . }}
name: {{ include "kafka-app.fullname" . }}
key: "{{ $key }}"
{{- end }}
{{- range $key, $value := .Values.secretRefs }}
Expand Down Expand Up @@ -231,7 +231,7 @@ spec:
imagePullPolicy: "{{ .Values.prometheus.jmx.imagePullPolicy }}"
args:
- {{ .Values.prometheus.jmx.port | quote }}
- /etc/jmx-{{ include "common-app.name" . }}/jmx-kafka-{{ include "common-app.name" . }}-prometheus.yml
- /etc/jmx-{{ include "kafka-app.name" . }}/jmx-kafka-{{ include "kafka-app.name" . }}-prometheus.yml
env:
- name: JAVA_TOOL_OPTIONS
value: "-XX:MaxRAMPercentage=90.0"
Expand All @@ -242,19 +242,19 @@ spec:
{{ toYaml .Values.prometheus.jmx.resources | indent 12 }}
volumeMounts:
- name: jmx-config
mountPath: /etc/jmx-{{ include "common-app.name" . }}
mountPath: /etc/jmx-{{ include "kafka-app.name" . }}
{{- end }}
{{- if or (.Values.prometheus.jmx.enabled) (.Values.files) (.Values.secretFilesRefs) }}
volumes:
{{- if .Values.prometheus.jmx.enabled }}
- name: jmx-config
configMap:
name: {{ include "common-app.fullname" . }}-jmx
name: {{ include "kafka-app.fullname" . }}-jmx
{{- end }}
{{- if .Values.files }}
- name: config
configMap:
name: {{ include "common-app.fullname" . }}
name: {{ include "kafka-app.fullname" . }}
{{- end }}
{{- range .Values.secretFilesRefs }}
- name: {{ .volume }}
Expand Down
Loading
Loading