From b5327e2de9e6c89a40acf6b6f0d84bfa5272f388 Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Thu, 23 May 2024 08:47:34 +0000 Subject: [PATCH 01/24] [Gradle Release Plugin] - pre tag commit: '2.20.0'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 8c12fea9..1ee2d115 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=2.19.3-SNAPSHOT +version=2.20.0 org.gradle.caching=true org.gradle.parallel=true kafkaVersion=3.6.1 From 169ea513ecde72f6ab0a749abe437a5a1418f5a6 Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Thu, 23 May 2024 08:47:34 +0000 Subject: [PATCH 02/24] [Gradle Release Plugin] - new version commit: '2.20.1-SNAPSHOT'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 1ee2d115..1ab4fc5e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=2.20.0 +version=2.20.1-SNAPSHOT org.gradle.caching=true org.gradle.parallel=true kafkaVersion=3.6.1 From eb5a4c5782363792ff0e4c1772ca8ec27cddd6b5 Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Thu, 23 May 2024 08:48:53 +0000 Subject: [PATCH 03/24] Changelog for version 2.20.0 --- CHANGELOG.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20e6cfff..7275a272 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,15 @@ # Change Log -## [2.19.2](https://github.com/bakdata/streams-bootstrap/tree/2.19.2) (2024-05-14) -[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.19.2...2.19.2) +## [2.20.0](https://github.com/bakdata/streams-bootstrap/tree/2.20.0) (2024-05-23) +[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.20.0...2.20.0) + + +## [2.20.0](https://github.com/bakdata/streams-bootstrap/tree/2.20.0) (2024-05-23) +[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.19.2...2.20.0) + +**Merged pull requests:** +- Mount arbitrary files to apps [\#223](https://github.com/bakdata/streams-bootstrap/pull/223) ([@philipp94831](https://github.com/philipp94831)) ## [2.19.2](https://github.com/bakdata/streams-bootstrap/tree/2.19.2) (2024-05-14) [View commits](https://github.com/bakdata/streams-bootstrap/compare/2.19.1...2.19.2) From 1fa7fb42dd4ee9e54e7d0912c3578dabc649b48f Mon Sep 17 00:00:00 2001 From: Philipp Schirmer Date: Thu, 23 May 2024 11:48:39 +0200 Subject: [PATCH 04/24] Fix content of config maps (#226) If the content of a file was yaml, the config map could not be created --- charts/producer-app-cleanup-job/templates/configmap.yaml | 2 +- charts/producer-app/templates/configmap.yaml | 2 +- charts/streams-app-cleanup-job/templates/configmap.yaml | 2 +- charts/streams-app/templates/configmap.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/producer-app-cleanup-job/templates/configmap.yaml b/charts/producer-app-cleanup-job/templates/configmap.yaml index 8a0f6053..e101b0e2 100644 --- a/charts/producer-app-cleanup-job/templates/configmap.yaml +++ b/charts/producer-app-cleanup-job/templates/configmap.yaml @@ -5,6 +5,6 @@ metadata: name: {{ template "producer-app-cleanup-job.name" . }} data: {{- range $key, $value := .Values.files }} - {{ $key }}: {{ $value.content | nindent 4 }} + {{ $key }}: {{ $value.content | quote }} {{- end }} {{ end }} diff --git a/charts/producer-app/templates/configmap.yaml b/charts/producer-app/templates/configmap.yaml index 04203ad1..da5bb989 100644 --- a/charts/producer-app/templates/configmap.yaml +++ b/charts/producer-app/templates/configmap.yaml @@ -5,6 +5,6 @@ metadata: name: {{ template "producer-app.name" . }} data: {{- range $key, $value := .Values.files }} - {{ $key }}: {{ $value.content | nindent 4 }} + {{ $key }}: {{ $value.content | quote }} {{- end }} {{ end }} diff --git a/charts/streams-app-cleanup-job/templates/configmap.yaml b/charts/streams-app-cleanup-job/templates/configmap.yaml index 6206009c..7750d86d 100644 --- a/charts/streams-app-cleanup-job/templates/configmap.yaml +++ b/charts/streams-app-cleanup-job/templates/configmap.yaml @@ -5,6 +5,6 @@ metadata: name: {{ template "streams-app-cleanup-job.name" . }} data: {{- range $key, $value := .Values.files }} - {{ $key }}: {{ $value.content | nindent 4 }} + {{ $key }}: {{ $value.content | quote }} {{- end }} {{ end }} diff --git a/charts/streams-app/templates/configmap.yaml b/charts/streams-app/templates/configmap.yaml index 8cb698e6..98c4aee3 100644 --- a/charts/streams-app/templates/configmap.yaml +++ b/charts/streams-app/templates/configmap.yaml @@ -5,6 +5,6 @@ metadata: name: {{ template "streams-app.name" . }} data: {{- range $key, $value := .Values.files }} - {{ $key }}: {{ $value.content | nindent 4 }} + {{ $key }}: {{ $value.content | quote }} {{- end }} {{ end }} From b0b23830da8910582887ec848c210cb0011f31c3 Mon Sep 17 00:00:00 2001 From: Philipp Schirmer Date: Thu, 23 May 2024 12:43:00 +0200 Subject: [PATCH 05/24] Roll deployments on config map updates (#227) https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments --- charts/producer-app/templates/pod.yaml | 5 ++++- charts/streams-app/templates/deployment.yaml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/charts/producer-app/templates/pod.yaml b/charts/producer-app/templates/pod.yaml index 96d60eae..7da0e538 100644 --- a/charts/producer-app/templates/pod.yaml +++ b/charts/producer-app/templates/pod.yaml @@ -1,8 +1,11 @@ {{- define "producer-app.podTemplate" -}} {{- $root := . -}} metadata: -{{- if .Values.podAnnotations }} +{{- if or .Values.podAnnotations (and .Values.deployment .Values.files) }} annotations: + {{- if and .Values.deployment .Values.files }} + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- end }} {{- range $key, $value := .Values.podAnnotations }} {{ $key | quote }}: {{ $value | quote }} {{- end }} diff --git a/charts/streams-app/templates/deployment.yaml b/charts/streams-app/templates/deployment.yaml index dc93c499..49325a98 100644 --- a/charts/streams-app/templates/deployment.yaml +++ b/charts/streams-app/templates/deployment.yaml @@ -39,8 +39,11 @@ spec: release: {{ .Release.Name }} template: metadata: - {{- if or .Values.prometheus.jmx.enabled .Values.podAnnotations }} + {{- if or .Values.prometheus.jmx.enabled .Values.podAnnotations .Values.files }} annotations: + {{- if .Values.files }} + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- end }} {{- if .Values.prometheus.jmx.enabled }} prometheus.io/scrape: "true" prometheus.io/port: {{ .Values.prometheus.jmx.port | quote }} From b3e24464eeb4dea33c1cb8c65ec33e0beee624f8 Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Thu, 23 May 2024 10:43:50 +0000 Subject: [PATCH 06/24] [Gradle Release Plugin] - pre tag commit: '2.20.1'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 1ab4fc5e..640286eb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=2.20.1-SNAPSHOT +version=2.20.1 org.gradle.caching=true org.gradle.parallel=true kafkaVersion=3.6.1 From 7fd62f291c6e496cd9e7272a4c1476e07ec92d6e Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Thu, 23 May 2024 10:43:50 +0000 Subject: [PATCH 07/24] [Gradle Release Plugin] - new version commit: '2.20.2-SNAPSHOT'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 640286eb..58e7e0d7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=2.20.1 +version=2.20.2-SNAPSHOT org.gradle.caching=true org.gradle.parallel=true kafkaVersion=3.6.1 From 80610af3bea605c27b5b4b2deed90bbd9e8d3ee4 Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Thu, 23 May 2024 10:45:21 +0000 Subject: [PATCH 08/24] Changelog for version 2.20.1 --- CHANGELOG.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7275a272..d7cbe0a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,16 @@ # Change Log -## [2.20.0](https://github.com/bakdata/streams-bootstrap/tree/2.20.0) (2024-05-23) -[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.20.0...2.20.0) +## [2.20.1](https://github.com/bakdata/streams-bootstrap/tree/2.20.1) (2024-05-23) +[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.20.1...2.20.1) + + +## [2.20.1](https://github.com/bakdata/streams-bootstrap/tree/2.20.1) (2024-05-23) +[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.20.0...2.20.1) + +**Merged pull requests:** +- Roll deployments on config map updates [\#227](https://github.com/bakdata/streams-bootstrap/pull/227) ([@philipp94831](https://github.com/philipp94831)) +- Fix content of config maps [\#226](https://github.com/bakdata/streams-bootstrap/pull/226) ([@philipp94831](https://github.com/philipp94831)) ## [2.20.0](https://github.com/bakdata/streams-bootstrap/tree/2.20.0) (2024-05-23) [View commits](https://github.com/bakdata/streams-bootstrap/compare/2.19.2...2.20.0) From eef6918c3593b3b9e9e1eb7daf89ecd41cb0ed3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20R=C3=B6der?= <33963579+yannick-roeder@users.noreply.github.com> Date: Fri, 24 May 2024 10:50:25 +0200 Subject: [PATCH 09/24] Make affinity in charts more generic (#224) --- .../templates/job.yaml | 8 ++--- charts/producer-app-cleanup-job/values.yaml | 22 +++----------- charts/producer-app/README.md | 6 ++-- charts/producer-app/templates/pod.yaml | 7 ++--- charts/producer-app/values.yaml | 22 +++----------- charts/rclone-copy/templates/rclone-cron.yaml | 8 ++--- charts/rclone-copy/values.yaml | 22 +++----------- .../templates/job.yaml | 8 ++--- charts/streams-app-cleanup-job/values.yaml | 23 ++++----------- charts/streams-app/README.md | 9 +++--- charts/streams-app/templates/deployment.yaml | 29 ++----------------- charts/streams-app/values.yaml | 24 +++------------ 12 files changed, 44 insertions(+), 144 deletions(-) diff --git a/charts/producer-app-cleanup-job/templates/job.yaml b/charts/producer-app-cleanup-job/templates/job.yaml index 86b40ae2..e63e3f64 100644 --- a/charts/producer-app-cleanup-job/templates/job.yaml +++ b/charts/producer-app-cleanup-job/templates/job.yaml @@ -1,5 +1,4 @@ {{- $root := . -}} - apiVersion: batch/v1 kind: Job metadata: @@ -42,11 +41,10 @@ spec: tolerations: {{ toYaml .Values.tolerations | indent 8 }} {{- end }} + {{- with .Values.affinity }} affinity: - {{- if .Values.nodeAffinity }} - nodeAffinity: -{{ toYaml .Values.nodeAffinity | indent 10 }} - {{- end }} + {{- tpl (toYaml .) $root | nindent 8 }} + {{- end }} {{- if .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml .Values.imagePullSecrets | nindent 8 }} diff --git a/charts/producer-app-cleanup-job/values.yaml b/charts/producer-app-cleanup-job/values.yaml index d1cc1a2c..890a6316 100644 --- a/charts/producer-app-cleanup-job/values.yaml +++ b/charts/producer-app-cleanup-job/values.yaml @@ -57,24 +57,10 @@ tolerations: [] # operator: "Exists" # effect: "NoSchedule" -nodeAffinity: {} -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: foo -# operator: In -# values: -# - bar -# - baz -# preferredDuringSchedulingIgnoredDuringExecution: -# - weight: 1 -# preference: -# matchExpressions: -# - key: foo -# operator: In -# values: -# - bar -# - baz +## Affinity for pod assignment (evaluated as template) +## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +## +affinity: {} resources: requests: diff --git a/charts/producer-app/README.md b/charts/producer-app/README.md index 3077a766..21c3f3ed 100644 --- a/charts/producer-app/README.md +++ b/charts/producer-app/README.md @@ -11,13 +11,13 @@ Alternatively, a YAML file that specifies the values for the parameters can be p ### Job | Parameter | Description | Default | -|------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------| +| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `nameOverride` | The name of the Kubernetes deployment. | `bakdata-producer-app` | | `resources` | See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ | see [values.yaml](values.yaml) for details | | `annotations` | Map of custom annotations to attach to the deployment. | `{}` | | `labels` | Map of custom labels to attach to the deployment. | `{}` | | `tolerations` | Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling. Further information can be found in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `{}` | -| `nodeAffinity` | Map to configure [pod affinities](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity). | `{}` | +| `affinity` | Map to configure [pod affinities](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity). | `{}` | | `deployment` | Deploy the producer as a Kubernetes Deployment (thereby ignoring Job-related configurations) | false | | `restartPolicy` | [Restart policy](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy) to use for the job. | `OnFailure` | | `schedule` | Cron expression to denote a schedule this producer app should be run on. It will then be deployed as a [CronJob](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/) instead of a [Job](https://kubernetes.io/docs/concepts/workloads/controllers/job/). | | @@ -57,7 +57,7 @@ Alternatively, a YAML file that specifies the values for the parameters can be p ### Other | Parameter | Description | Default | -|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| +| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | | `configurationEnvPrefix` | Prefix for environment variables to use that should be parsed as command line arguments. | `APP` | | `commandLine` | Map of command line arguments passed to the producer app. | `{}` | | `debug` | Configure logging to debug | `false` | diff --git a/charts/producer-app/templates/pod.yaml b/charts/producer-app/templates/pod.yaml index 7da0e538..e3bbbf1e 100644 --- a/charts/producer-app/templates/pod.yaml +++ b/charts/producer-app/templates/pod.yaml @@ -27,11 +27,10 @@ spec: tolerations: {{ toYaml .Values.tolerations | indent 4 }} {{- end }} + {{- with .Values.affinity }} affinity: - {{- if .Values.nodeAffinity }} - nodeAffinity: -{{ toYaml .Values.nodeAffinity | indent 6 }} - {{- end }} + {{- tpl (toYaml .) $root | nindent 4 }} + {{- end }} {{- if .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml .Values.imagePullSecrets | nindent 8 }} diff --git a/charts/producer-app/values.yaml b/charts/producer-app/values.yaml index 708a7fd8..4b02f0c6 100644 --- a/charts/producer-app/values.yaml +++ b/charts/producer-app/values.yaml @@ -35,24 +35,10 @@ tolerations: [] # operator: "Exists" # effect: "NoSchedule" -nodeAffinity: {} -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: foo -# operator: In -# values: -# - bar -# - baz -# preferredDuringSchedulingIgnoredDuringExecution: -# - weight: 1 -# preference: -# matchExpressions: -# - key: foo -# operator: In -# values: -# - bar -# - baz +## Affinity for pod assignment (evaluated as template) +## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +## +affinity: {} resources: requests: diff --git a/charts/rclone-copy/templates/rclone-cron.yaml b/charts/rclone-copy/templates/rclone-cron.yaml index f644c017..7ddf601c 100644 --- a/charts/rclone-copy/templates/rclone-cron.yaml +++ b/charts/rclone-copy/templates/rclone-cron.yaml @@ -1,3 +1,4 @@ +{{- $root := . -}} {{- if .Capabilities.APIVersions.Has "batch/v1/CronJob" }} apiVersion: batch/v1 {{- else }} @@ -49,11 +50,10 @@ spec: tolerations: {{ toYaml .Values.tolerations | indent 12 }} {{- end }} + {{- with .Values.affinity }} affinity: - {{- if .Values.nodeAffinity }} - nodeAffinity: -{{ toYaml .Values.nodeAffinity | indent 14 }} - {{- end }} + {{- tpl (toYaml .) $root | nindent 12 }} + {{- end }} containers: - name: rclone-container image: rclone/rclone:{{ .Values.imageRelease }} diff --git a/charts/rclone-copy/values.yaml b/charts/rclone-copy/values.yaml index 5fc3632c..ace2fc06 100644 --- a/charts/rclone-copy/values.yaml +++ b/charts/rclone-copy/values.yaml @@ -56,24 +56,10 @@ tolerations: [] # operator: "Exists" # effect: "NoSchedule" -nodeAffinity: {} -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: foo -# operator: In -# values: -# - bar -# - baz -# preferredDuringSchedulingIgnoredDuringExecution: -# - weight: 1 -# preference: -# matchExpressions: -# - key: foo -# operator: In -# values: -# - bar -# - baz +## Affinity for pod assignment (evaluated as template) +## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +## +affinity: {} resources: requests: diff --git a/charts/streams-app-cleanup-job/templates/job.yaml b/charts/streams-app-cleanup-job/templates/job.yaml index a3b401f7..33fd758a 100644 --- a/charts/streams-app-cleanup-job/templates/job.yaml +++ b/charts/streams-app-cleanup-job/templates/job.yaml @@ -1,5 +1,4 @@ {{- $root := . -}} - apiVersion: batch/v1 kind: Job metadata: @@ -42,11 +41,10 @@ spec: tolerations: {{ toYaml .Values.tolerations | indent 8 }} {{- end }} + {{- with .Values.affinity }} affinity: - {{- if .Values.nodeAffinity }} - nodeAffinity: -{{ toYaml .Values.nodeAffinity | indent 10 }} - {{- end }} + {{- tpl (toYaml .) $root | nindent 8 }} + {{- end }} {{- if .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml .Values.imagePullSecrets | nindent 8 }} diff --git a/charts/streams-app-cleanup-job/values.yaml b/charts/streams-app-cleanup-job/values.yaml index 0c4fb7bb..68171d5e 100644 --- a/charts/streams-app-cleanup-job/values.yaml +++ b/charts/streams-app-cleanup-job/values.yaml @@ -70,24 +70,11 @@ tolerations: [] # operator: "Exists" # effect: "NoSchedule" -nodeAffinity: {} -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: foo -# operator: In -# values: -# - bar -# - baz -# preferredDuringSchedulingIgnoredDuringExecution: -# - weight: 1 -# preference: -# matchExpressions: -# - key: foo -# operator: In -# values: -# - bar -# - baz + +## Affinity for pod assignment (evaluated as template) +## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +## +affinity: {} resources: requests: diff --git a/charts/streams-app/README.md b/charts/streams-app/README.md index 4981e1a7..004a0430 100644 --- a/charts/streams-app/README.md +++ b/charts/streams-app/README.md @@ -11,7 +11,7 @@ Alternatively, a YAML file that specifies the values for the parameters can be p ### Deployment | Parameter | Description | Default | -|---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------| +| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `nameOverride` | The name of the Kubernetes deployment. | `bakdata-streams-app` | | `replicaCount` | The number of Kafka Streams replicas. | `1` | | `resources` | See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ | see [values.yaml](values.yaml) for details | @@ -20,8 +20,7 @@ Alternatively, a YAML file that specifies the values for the parameters can be p | `tolerations` | Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling. Further information can be found in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `{}` | | `statefulSet` | Whether to use a [Statefulset](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) instead of a [Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) to deploy the streams app. | `false` | | `priorityClassName` | [Priority class name](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/) for the pod. | | -| `nodeAffinity` | Map to configure [pod affinities](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity). | `{}` | -| `requirePodAntiAffinity` | Whether to require replicas to be scheduled on different nodes. See https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity. | `false` | +| `affinity` | Map to configure [pod affinities](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity). | `{}` | | `ports.containerPort` | Number of the port to expose. | | | `ports.name` | Services can reference port by name (optional). | | | `ports.schema` | Protocol for port. Must be UDP, TCP, or SCTP (optional). | | @@ -70,7 +69,7 @@ Alternatively, a YAML file that specifies the values for the parameters can be p ### Other | Parameter | Description | Default | -|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| +| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | | `configurationEnvPrefix` | Prefix for environment variables to use that should be parsed as command line arguments. | `APP` | | `commandLine` | Map of command line arguments passed to the streams app. | `{}` | | `debug` | Configure logging to debug | `false` | @@ -100,7 +99,7 @@ Alternatively, a YAML file that specifies the values for the parameters can be p ### Auto-Scaling | Parameter | Description | Default | -|----------------------------------|--------------------------------------------------------------------------------------------------------------------|------------| +| -------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---------- | | `autoscaling.enabled` | Whether to enable auto-scaling using [KEDA](https://keda.sh/docs/latest/scalers/apache-kafka/). | `false` | | `autoscaling.consumerGroup` | Name of the consumer group used for checking the offset on the topic and processing the related lag. | | | `autoscaling.lagThreshold` | Average target value to trigger scaling actions. | | diff --git a/charts/streams-app/templates/deployment.yaml b/charts/streams-app/templates/deployment.yaml index 49325a98..5a7ab0bf 100644 --- a/charts/streams-app/templates/deployment.yaml +++ b/charts/streams-app/templates/deployment.yaml @@ -66,33 +66,10 @@ spec: tolerations: {{ toYaml .Values.tolerations | indent 8 }} {{- end }} + {{- with .Values.affinity }} affinity: - {{- if .Values.nodeAffinity }} - nodeAffinity: -{{ toYaml .Values.nodeAffinity | indent 10 }} - {{- end }} - podAntiAffinity: - {{- if .Values.requirePodAntiAffinity }} - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "streams-app.name" . }} - topologyKey: "kubernetes.io/hostname" - {{- else }} - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "streams-app.name" . }} - {{- end }} + {{- tpl (toYaml .) $root | nindent 8 }} + {{- end }} {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} diff --git a/charts/streams-app/values.yaml b/charts/streams-app/values.yaml index ca3da1ef..9569b107 100644 --- a/charts/streams-app/values.yaml +++ b/charts/streams-app/values.yaml @@ -166,26 +166,10 @@ prometheus: # priorityClass # priorityClassName: "" -requirePodAntiAffinity: false - -nodeAffinity: {} -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: foo -# operator: In -# values: -# - bar -# - baz -# preferredDuringSchedulingIgnoredDuringExecution: -# - weight: 1 -# preference: -# matchExpressions: -# - key: foo -# operator: In -# values: -# - bar -# - baz +## Affinity for pod assignment (evaluated as template) +## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +## +affinity: {} persistence: enabled: false From 33617ef565241923ec43f743984d7f7f2815b78c Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Fri, 24 May 2024 09:12:38 +0000 Subject: [PATCH 10/24] [Gradle Release Plugin] - pre tag commit: '2.21.0'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 58e7e0d7..2aa4ab3b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=2.20.2-SNAPSHOT +version=2.21.0 org.gradle.caching=true org.gradle.parallel=true kafkaVersion=3.6.1 From ed6ffedf187f2ee73e4156900b189583d24289fd Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Fri, 24 May 2024 09:12:38 +0000 Subject: [PATCH 11/24] [Gradle Release Plugin] - new version commit: '2.21.1-SNAPSHOT'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 2aa4ab3b..53f6d534 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=2.21.0 +version=2.21.1-SNAPSHOT org.gradle.caching=true org.gradle.parallel=true kafkaVersion=3.6.1 From 38952234dd5950a031bc53d8f26c15e0787c844b Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Fri, 24 May 2024 09:14:00 +0000 Subject: [PATCH 12/24] Changelog for version 2.21.0 --- CHANGELOG.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7cbe0a4..087c5bd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,15 @@ # Change Log -## [2.20.1](https://github.com/bakdata/streams-bootstrap/tree/2.20.1) (2024-05-23) -[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.20.1...2.20.1) +## [2.21.0](https://github.com/bakdata/streams-bootstrap/tree/2.21.0) (2024-05-24) +[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.21.0...2.21.0) + + +## [2.21.0](https://github.com/bakdata/streams-bootstrap/tree/2.21.0) (2024-05-24) +[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.20.1...2.21.0) + +**Merged pull requests:** +- Make affinity in charts more generic [\#224](https://github.com/bakdata/streams-bootstrap/pull/224) ([@yannick-roeder](https://github.com/yannick-roeder)) ## [2.20.1](https://github.com/bakdata/streams-bootstrap/tree/2.20.1) (2024-05-23) [View commits](https://github.com/bakdata/streams-bootstrap/compare/2.20.0...2.20.1) From 3db1972b5f7072b7ac5a5188220142e9144d3134 Mon Sep 17 00:00:00 2001 From: Torben Meyer Date: Mon, 10 Jun 2024 09:27:40 +0200 Subject: [PATCH 13/24] Support mounting of external secrets (#225) --- .../templates/job.yaml | 23 ++++++++++++++--- charts/producer-app-cleanup-job/values.yaml | 6 +++++ charts/producer-app/README.md | 1 + charts/producer-app/templates/pod.yaml | 25 ++++++++++++++++--- charts/producer-app/values.yaml | 6 +++++ .../templates/job.yaml | 21 ++++++++++++++-- charts/streams-app-cleanup-job/values.yaml | 6 +++++ charts/streams-app/README.md | 1 + charts/streams-app/templates/deployment.yaml | 19 ++++++++++++-- charts/streams-app/values.yaml | 6 +++++ 10 files changed, 103 insertions(+), 11 deletions(-) diff --git a/charts/producer-app-cleanup-job/templates/job.yaml b/charts/producer-app-cleanup-job/templates/job.yaml index e63e3f64..b0ed574d 100644 --- a/charts/producer-app-cleanup-job/templates/job.yaml +++ b/charts/producer-app-cleanup-job/templates/job.yaml @@ -109,18 +109,35 @@ spec: - name: JAVA_TOOL_OPTIONS value: '-XX:MaxRAMPercentage={{ printf "%.1f" .Values.javaOptions.maxRAMPercentage }} {{ .Values.javaOptions.others | join " " }}' - {{- if .Values.files }} + {{- if or (.Values.files) (.Values.secretFilesRefs) }} volumeMounts: {{- range $key, $value := .Values.files }} - name: config mountPath: {{ printf "%s/%s" $value.mountPath $key | quote }} subPath: {{ $key | quote }} {{- end }} - {{- end }} - {{- if .Values.files }} + {{- range .Values.secretFilesRefs }} + - name: {{ .volume }} + mountPath: {{ .mountPath }} + {{- if .readOnly }} + readOnly: true + {{- end }} + {{- if .subPath}} + subPath: {{.subPath }} + {{- end }} + {{- end }} + {{- end }} + {{- if or (.Values.files) (.Values.secretFilesRefs) }} volumes: + {{- if .Values.files }} - name: config configMap: name: {{ template "producer-app-cleanup-job.name" . }} + {{- end }} + {{- range .Values.secretFilesRefs }} + - name: {{ .volume }} + secret: + secretName: {{ .name }} + {{- end }} {{- end }} backoffLimit: {{ .Values.backoffLimit }} diff --git a/charts/producer-app-cleanup-job/values.yaml b/charts/producer-app-cleanup-job/values.yaml index 890a6316..e0d956f7 100644 --- a/charts/producer-app-cleanup-job/values.yaml +++ b/charts/producer-app-cleanup-job/values.yaml @@ -40,6 +40,12 @@ secretRefs: {} # MY_SECRET: # name: secretName # key: secretKey +secretFilesRefs: [] +# - name: my-secret +# volume: secret-volume +# mountPath: /etc/test +# readOnly: true +# subPath: optional-subpath annotations: {} # MY_ANNOTATION: "foo-bar" diff --git a/charts/producer-app/README.md b/charts/producer-app/README.md index 21c3f3ed..daf5a657 100644 --- a/charts/producer-app/README.md +++ b/charts/producer-app/README.md @@ -64,6 +64,7 @@ Alternatively, a YAML file that specifies the values for the parameters can be p | `env` | Custom environment variables | `{}` | | `secrets` | Custom secret environment variables. Prefix with `configurationEnvPrefix` in order to pass secrets to command line or prefix with `STREAMS_` to pass secrets to Kafka Streams configuration. E.g., `APP_MY_PARAM` would be passed as `--my-param` and `STREAMS_MAX_POLL_TIMEOUT_MS` would be translated to `max.poll.timeout.ms`. | `{}` | | `secretRefs` | Inject existing secrets as environment variables. Map key is used as environment variable name. Value consists of secret `name` and `key`. | `{}` | +| `secretFilesRefs` | Mount existing secrets as volumes | `[]` | | `files` | Map of files to mount for the app. File will be mounted as `$value.mountPath/$key`. `$value.content` denotes file content (recommended to be used with `--set-file`). | `{}` | ### JVM diff --git a/charts/producer-app/templates/pod.yaml b/charts/producer-app/templates/pod.yaml index e3bbbf1e..772a716a 100644 --- a/charts/producer-app/templates/pod.yaml +++ b/charts/producer-app/templates/pod.yaml @@ -109,18 +109,35 @@ spec: readinessProbe: {{- .Values.readinessProbe | toYaml | nindent 6 }} {{- end }} - {{- if .Values.files }} + {{- if or (.Values.files) (.Values.secretFilesRefs) }} volumeMounts: {{- range $key, $value := .Values.files }} - name: config mountPath: {{ printf "%s/%s" $value.mountPath $key | quote }} subPath: {{ $key | quote }} {{- end }} - {{- end }} - {{- if .Values.files }} + {{- range .Values.secretFilesRefs }} + - name: {{ .volume }} + mountPath: {{ .mountPath }} + {{- if .readOnly }} + readOnly: true + {{- end }} + {{- if .subPath}} + subPath: {{.subPath }} + {{- end }} + {{- end }} + {{- end }} + {{- if or (.Values.files) (.Values.secretFilesRefs) }} volumes: + {{- if .Values.files }} - name: config configMap: - name: {{ template "producer-app.name" . }} + name: {{ template "producer-app.chart.name" . }} + {{- end }} + {{- range .Values.secretFilesRefs }} + - name: {{ .volume }} + secret: + secretName: {{ .name }} + {{- end }} {{- end }} {{- end -}} diff --git a/charts/producer-app/values.yaml b/charts/producer-app/values.yaml index 4b02f0c6..4f7480ab 100644 --- a/charts/producer-app/values.yaml +++ b/charts/producer-app/values.yaml @@ -73,6 +73,12 @@ secretRefs: {} # MY_SECRET: # name: secretName # key: secretKey +secretFilesRefs: [] +# - name: my-secret +# volume: secret-volume +# mountPath: /etc/test +# readOnly: true +# subPath: optional-subpath annotations: {} # MY_ANNOTATION: "foo-bar" diff --git a/charts/streams-app-cleanup-job/templates/job.yaml b/charts/streams-app-cleanup-job/templates/job.yaml index 33fd758a..e0a1fe59 100644 --- a/charts/streams-app-cleanup-job/templates/job.yaml +++ b/charts/streams-app-cleanup-job/templates/job.yaml @@ -138,18 +138,35 @@ spec: - name: JAVA_TOOL_OPTIONS value: '-XX:MaxRAMPercentage={{ printf "%.1f" .Values.javaOptions.maxRAMPercentage }} {{ .Values.javaOptions.others | join " " }}' - {{- if .Values.files }} + {{- if or (.Values.files) (.Values.secretFilesRefs) }} volumeMounts: {{- range $key, $value := .Values.files }} - name: config mountPath: {{ printf "%s/%s" $value.mountPath $key | quote }} subPath: {{ $key | quote }} {{- end }} + {{- range .Values.secretFilesRefs }} + - name: {{ .volume }} + mountPath: {{ .mountPath }} + {{- if .readOnly }} + readOnly: true + {{- end }} + {{- if .subPath}} + subPath: {{.subPath }} + {{- end }} + {{- end }} {{- end }} - {{- if .Values.files }} + {{- if or (.Values.files) (.Values.secretFilesRefs) }} volumes: + {{- if .Values.files }} - name: config configMap: name: {{ template "streams-app-cleanup-job.name" . }} + {{- end }} + {{- range .Values.secretFilesRefs }} + - name: {{ .volume }} + secret: + secretName: {{ .name }} + {{- end }} {{- end }} backoffLimit: {{ .Values.backoffLimit }} diff --git a/charts/streams-app-cleanup-job/values.yaml b/charts/streams-app-cleanup-job/values.yaml index 68171d5e..19426361 100644 --- a/charts/streams-app-cleanup-job/values.yaml +++ b/charts/streams-app-cleanup-job/values.yaml @@ -53,6 +53,12 @@ secretRefs: {} # MY_SECRET: # name: secretName # key: secretKey +secretFilesRefs: [] +# - name: my-secret +# volume: secret-volume +# mountPath: /etc/test +# readOnly: true +# subPath: optional-subpath annotations: {} # MY_ANNOTATION: "foo-bar" diff --git a/charts/streams-app/README.md b/charts/streams-app/README.md index 004a0430..97e88b36 100644 --- a/charts/streams-app/README.md +++ b/charts/streams-app/README.md @@ -76,6 +76,7 @@ Alternatively, a YAML file that specifies the values for the parameters can be p | `env` | Custom environment variables | `{}` | | `secrets` | Custom secret environment variables. Prefix with `configurationEnvPrefix` in order to pass secrets to command line or prefix with `STREAMS_` to pass secrets to Kafka Streams configuration. E.g., `APP_MY_PARAM` would be passed as `--my-param` and `STREAMS_MAX_POLL_TIMEOUT_MS` would be translated to `max.poll.timeout.ms`. | `{}` | | `secretRefs` | Inject existing secrets as environment variables. Map key is used as environment variable name. Value consists of secret `name` and `key`. | `{}` | +| `secretFilesRefs` | Mount existing secrets as volumes | `[]` | | `files` | Map of files to mount for the app. File will be mounted as `$value.mountPath/$key`. `$value.content` denotes file content (recommended to be used with `--set-file`). | `{}` | ### JMX Configuration diff --git a/charts/streams-app/templates/deployment.yaml b/charts/streams-app/templates/deployment.yaml index 5a7ab0bf..8c6d73fa 100644 --- a/charts/streams-app/templates/deployment.yaml +++ b/charts/streams-app/templates/deployment.yaml @@ -178,13 +178,23 @@ spec: -Dcom.sun.management.jmxremote.ssl=false -XX:MaxRAMPercentage={{ printf "%.1f" .Values.javaOptions.maxRAMPercentage }} {{ .Values.javaOptions.others | join " " }}' - {{- if or (.Values.files) (and .Values.persistence.enabled .Values.statefulSet) }} + {{- if or (.Values.files) (and .Values.persistence.enabled .Values.statefulSet) (.Values.secretFilesRefs) }} volumeMounts: {{- range $key, $value := .Values.files }} - name: config mountPath: {{ printf "%s/%s" $value.mountPath $key | quote }} subPath: {{ $key | quote }} {{- end }} + {{- range .Values.secretFilesRefs }} + - name: {{ .volume }} + mountPath: {{ .mountPath }} + {{- if .readOnly }} + readOnly: true + {{- end }} + {{- if .subPath}} + subPath: {{.subPath }} + {{- end }} + {{- end }} {{- if and .Values.persistence.enabled .Values.statefulSet }} - name: datadir mountPath: /tmp/kafka-streams @@ -233,7 +243,7 @@ spec: - name: jmx-config mountPath: /etc/jmx-streams-app {{- end }} - {{- if or (.Values.prometheus.jmx.enabled) (.Values.files) }} + {{- if or (.Values.prometheus.jmx.enabled) (.Values.files) (.Values.secretFilesRefs) }} volumes: {{- if .Values.prometheus.jmx.enabled }} - name: jmx-config @@ -245,6 +255,11 @@ spec: configMap: name: {{ template "streams-app.name" . }} {{- end }} + {{- range .Values.secretFilesRefs }} + - name: {{ .volume }} + secret: + secretName: {{ .name }} + {{- end }} {{- end }} {{- if and .Values.persistence.enabled .Values.statefulSet }} volumeClaimTemplates: diff --git a/charts/streams-app/values.yaml b/charts/streams-app/values.yaml index 9569b107..43749141 100644 --- a/charts/streams-app/values.yaml +++ b/charts/streams-app/values.yaml @@ -62,6 +62,12 @@ secretRefs: {} # MY_SECRET: # name: secretName # key: secretKey +secretFilesRefs: [] +# - name: my-secret +# volume: secret-volume +# mountPath: /etc/test +# readOnly: true +# subPath: optional-subpath # Additional ports ports: [] From 331f912e13b854fa9fb23b36b569b08a6373d40e Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Mon, 10 Jun 2024 08:27:01 +0000 Subject: [PATCH 14/24] [Gradle Release Plugin] - pre tag commit: '2.22.0'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 53f6d534..5bdf545c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=2.21.1-SNAPSHOT +version=2.22.0 org.gradle.caching=true org.gradle.parallel=true kafkaVersion=3.6.1 From f559b48bbcc528d2feeddbe7242ce3a7eed65267 Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Mon, 10 Jun 2024 08:27:01 +0000 Subject: [PATCH 15/24] [Gradle Release Plugin] - new version commit: '2.22.1-SNAPSHOT'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 5bdf545c..eafcca8a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=2.22.0 +version=2.22.1-SNAPSHOT org.gradle.caching=true org.gradle.parallel=true kafkaVersion=3.6.1 From 271338cb1257390597d883d365b4e0ecb5b00220 Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Mon, 10 Jun 2024 08:28:24 +0000 Subject: [PATCH 16/24] Changelog for version 2.22.0 --- CHANGELOG.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 087c5bd9..c1c1262c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,15 @@ # Change Log -## [2.21.0](https://github.com/bakdata/streams-bootstrap/tree/2.21.0) (2024-05-24) -[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.21.0...2.21.0) +## [2.22.0](https://github.com/bakdata/streams-bootstrap/tree/2.22.0) (2024-06-10) +[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.22.0...2.22.0) + + +## [2.22.0](https://github.com/bakdata/streams-bootstrap/tree/2.22.0) (2024-06-10) +[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.21.0...2.22.0) + +**Merged pull requests:** +- Support mounting of external secrets [\#225](https://github.com/bakdata/streams-bootstrap/pull/225) ([@torbsto](https://github.com/torbsto)) ## [2.21.0](https://github.com/bakdata/streams-bootstrap/tree/2.21.0) (2024-05-24) [View commits](https://github.com/bakdata/streams-bootstrap/compare/2.20.1...2.21.0) From e9c9935550bdf7ea678835d2fcfc8a21ceba4681 Mon Sep 17 00:00:00 2001 From: Philipp Schirmer Date: Tue, 11 Jun 2024 15:12:15 +0200 Subject: [PATCH 17/24] Use same variable names for clean up job as for main chart (#228) Using templating variables in affinities is broken since #224 --- .../templates/_helpers.tpl | 6 +++--- .../templates/configmap.yaml | 2 +- charts/producer-app-cleanup-job/templates/job.yaml | 14 +++++++------- .../templates/secrets.yaml | 2 +- .../streams-app-cleanup-job/templates/_helpers.tpl | 6 +++--- .../templates/configmap.yaml | 2 +- charts/streams-app-cleanup-job/templates/job.yaml | 14 +++++++------- .../streams-app-cleanup-job/templates/secrets.yaml | 2 +- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/charts/producer-app-cleanup-job/templates/_helpers.tpl b/charts/producer-app-cleanup-job/templates/_helpers.tpl index bd6f76e8..f21b03b8 100644 --- a/charts/producer-app-cleanup-job/templates/_helpers.tpl +++ b/charts/producer-app-cleanup-job/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "producer-app-cleanup-job.name" -}} +{{- define "producer-app.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -12,7 +12,7 @@ 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 "producer-app-cleanup-job.fullname" -}} +{{- define "producer-app.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -24,6 +24,6 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "producer-app-cleanup-job.chart" -}} +{{- define "producer-app.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} diff --git a/charts/producer-app-cleanup-job/templates/configmap.yaml b/charts/producer-app-cleanup-job/templates/configmap.yaml index e101b0e2..da5bb989 100644 --- a/charts/producer-app-cleanup-job/templates/configmap.yaml +++ b/charts/producer-app-cleanup-job/templates/configmap.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ template "producer-app-cleanup-job.name" . }} + name: {{ template "producer-app.name" . }} data: {{- range $key, $value := .Values.files }} {{ $key }}: {{ $value.content | quote }} diff --git a/charts/producer-app-cleanup-job/templates/job.yaml b/charts/producer-app-cleanup-job/templates/job.yaml index b0ed574d..94d0e5f3 100644 --- a/charts/producer-app-cleanup-job/templates/job.yaml +++ b/charts/producer-app-cleanup-job/templates/job.yaml @@ -2,7 +2,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: {{ template "producer-app-cleanup-job.fullname" . }} + name: {{ template "producer-app.fullname" . }} {{- if .Values.annotations }} annotations: {{- range $key, $value := .Values.annotations }} @@ -10,8 +10,8 @@ metadata: {{- end }} {{- end }} labels: - app: {{ template "producer-app-cleanup-job.name" . }} - chart: {{ template "producer-app-cleanup-job.chart" . }} + app: {{ template "producer-app.name" . }} + chart: {{ template "producer-app.chart" . }} release: {{ .Release.Name }} {{- range $key, $value := .Values.labels }} {{ $key }}: {{ $value }} @@ -27,7 +27,7 @@ spec: {{- end }} {{- end }} labels: - app: {{ template "producer-app-cleanup-job.name" . }} + app: {{ template "producer-app.name" . }} release: {{ .Release.Name }} {{- range $key, $value := .Values.podLabels }} {{ $key }}: {{ $value }} @@ -50,7 +50,7 @@ spec: {{- toYaml .Values.imagePullSecrets | nindent 8 }} {{- end }} containers: - - name: {{ template "producer-app-cleanup-job.name" . }} + - name: {{ template "producer-app.name" . }} image: "{{ .Values.image }}:{{ .Values.imageTag }}" imagePullPolicy: "{{ .Values.imagePullPolicy }}" resources: @@ -88,7 +88,7 @@ spec: - name: "{{ $key }}" valueFrom: secretKeyRef: - name: {{ template "producer-app-cleanup-job.fullname" $ }} + name: {{ template "producer-app.fullname" $ }} key: "{{ $key }}" {{- end }} {{- range $key, $value := .Values.secretRefs }} @@ -132,7 +132,7 @@ spec: {{- if .Values.files }} - name: config configMap: - name: {{ template "producer-app-cleanup-job.name" . }} + name: {{ template "producer-app.name" . }} {{- end }} {{- range .Values.secretFilesRefs }} - name: {{ .volume }} diff --git a/charts/producer-app-cleanup-job/templates/secrets.yaml b/charts/producer-app-cleanup-job/templates/secrets.yaml index 945f4a0a..7dccd797 100644 --- a/charts/producer-app-cleanup-job/templates/secrets.yaml +++ b/charts/producer-app-cleanup-job/templates/secrets.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Secret metadata: - name: {{ template "producer-app-cleanup-job.fullname" . }} + name: {{ template "producer-app.fullname" . }} type: Opaque data: {{- range $key, $value := .Values.secrets }} diff --git a/charts/streams-app-cleanup-job/templates/_helpers.tpl b/charts/streams-app-cleanup-job/templates/_helpers.tpl index 3596a661..4944f922 100644 --- a/charts/streams-app-cleanup-job/templates/_helpers.tpl +++ b/charts/streams-app-cleanup-job/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "streams-app-cleanup-job.name" -}} +{{- define "streams-app.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -12,7 +12,7 @@ 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-cleanup-job.fullname" -}} +{{- define "streams-app.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -24,6 +24,6 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "streams-app-cleanup-job.chart" -}} +{{- define "streams-app.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} diff --git a/charts/streams-app-cleanup-job/templates/configmap.yaml b/charts/streams-app-cleanup-job/templates/configmap.yaml index 7750d86d..98c4aee3 100644 --- a/charts/streams-app-cleanup-job/templates/configmap.yaml +++ b/charts/streams-app-cleanup-job/templates/configmap.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ template "streams-app-cleanup-job.name" . }} + name: {{ template "streams-app.name" . }} data: {{- range $key, $value := .Values.files }} {{ $key }}: {{ $value.content | quote }} diff --git a/charts/streams-app-cleanup-job/templates/job.yaml b/charts/streams-app-cleanup-job/templates/job.yaml index e0a1fe59..e2e315c4 100644 --- a/charts/streams-app-cleanup-job/templates/job.yaml +++ b/charts/streams-app-cleanup-job/templates/job.yaml @@ -2,7 +2,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: {{ template "streams-app-cleanup-job.fullname" . }} + name: {{ template "streams-app.fullname" . }} {{- if .Values.annotations }} annotations: {{- range $key, $value := .Values.annotations }} @@ -10,8 +10,8 @@ metadata: {{- end }} {{- end }} labels: - app: {{ template "streams-app-cleanup-job.name" . }} - chart: {{ template "streams-app-cleanup-job.chart" . }} + app: {{ template "streams-app.name" . }} + chart: {{ template "streams-app.chart" . }} release: {{ .Release.Name }} {{- range $key, $value := .Values.labels }} {{ $key }}: {{ $value }} @@ -27,7 +27,7 @@ spec: {{- end }} {{- end }} labels: - app: {{ template "streams-app-cleanup-job.name" . }} + app: {{ template "streams-app.name" . }} release: {{ .Release.Name }} {{- range $key, $value := .Values.podLabels }} {{ $key }}: {{ $value }} @@ -50,7 +50,7 @@ spec: {{- toYaml .Values.imagePullSecrets | nindent 8 }} {{- end }} containers: - - name: {{ template "streams-app-cleanup-job.name" . }} + - name: {{ template "streams-app.name" . }} image: "{{ .Values.image }}:{{ .Values.imageTag }}" imagePullPolicy: "{{ .Values.imagePullPolicy }}" resources: @@ -117,7 +117,7 @@ spec: - name: "{{ $key }}" valueFrom: secretKeyRef: - name: {{ template "streams-app-cleanup-job.fullname" $ }} + name: {{ template "streams-app.fullname" $ }} key: "{{ $key }}" {{- end }} {{- range $key, $value := .Values.secretRefs }} @@ -161,7 +161,7 @@ spec: {{- if .Values.files }} - name: config configMap: - name: {{ template "streams-app-cleanup-job.name" . }} + name: {{ template "streams-app.name" . }} {{- end }} {{- range .Values.secretFilesRefs }} - name: {{ .volume }} diff --git a/charts/streams-app-cleanup-job/templates/secrets.yaml b/charts/streams-app-cleanup-job/templates/secrets.yaml index 20c099db..feb79e5b 100644 --- a/charts/streams-app-cleanup-job/templates/secrets.yaml +++ b/charts/streams-app-cleanup-job/templates/secrets.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Secret metadata: - name: {{ template "streams-app-cleanup-job.fullname" . }} + name: {{ template "streams-app.fullname" . }} type: Opaque data: {{- range $key, $value := .Values.secrets }} From 6d76f32ee40e041c8d403e3c1782fd2428e87763 Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Tue, 11 Jun 2024 13:13:06 +0000 Subject: [PATCH 18/24] [Gradle Release Plugin] - pre tag commit: '2.22.1'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index eafcca8a..2f216a78 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=2.22.1-SNAPSHOT +version=2.22.1 org.gradle.caching=true org.gradle.parallel=true kafkaVersion=3.6.1 From 918b4d446f8edd6125c543f1af963d216046ec1e Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Tue, 11 Jun 2024 13:13:06 +0000 Subject: [PATCH 19/24] [Gradle Release Plugin] - new version commit: '2.22.2-SNAPSHOT'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 2f216a78..1b8c4ba2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=2.22.1 +version=2.22.2-SNAPSHOT org.gradle.caching=true org.gradle.parallel=true kafkaVersion=3.6.1 From 2880ef11489c8e302717b5d0ae46d8ea0d4b6434 Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Tue, 11 Jun 2024 13:14:30 +0000 Subject: [PATCH 20/24] Changelog for version 2.22.1 --- CHANGELOG.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1c1262c..c8e58de2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,15 @@ # Change Log -## [2.22.0](https://github.com/bakdata/streams-bootstrap/tree/2.22.0) (2024-06-10) -[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.22.0...2.22.0) +## [2.22.1](https://github.com/bakdata/streams-bootstrap/tree/2.22.1) (2024-06-11) +[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.22.1...2.22.1) + + +## [2.22.1](https://github.com/bakdata/streams-bootstrap/tree/2.22.1) (2024-06-11) +[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.22.0...2.22.1) + +**Merged pull requests:** +- Use same variable names for clean up job as for main chart [\#228](https://github.com/bakdata/streams-bootstrap/pull/228) ([@philipp94831](https://github.com/philipp94831)) ## [2.22.0](https://github.com/bakdata/streams-bootstrap/tree/2.22.0) (2024-06-10) [View commits](https://github.com/bakdata/streams-bootstrap/compare/2.21.0...2.22.0) From 14827e723af04ea7398cbc853fd95478906a48c9 Mon Sep 17 00:00:00 2001 From: Philipp Schirmer Date: Wed, 12 Jun 2024 10:48:26 +0200 Subject: [PATCH 21/24] Add dynamic application.server config to streams app chart (#214) --- charts/streams-app/README.md | 10 +++++----- charts/streams-app/templates/deployment.yaml | 10 ++++++++++ charts/streams-app/templates/service.yaml | 2 +- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/charts/streams-app/README.md b/charts/streams-app/README.md index 97e88b36..4698348c 100644 --- a/charts/streams-app/README.md +++ b/charts/streams-app/README.md @@ -123,8 +123,8 @@ Alternatively, a YAML file that specifies the values for the parameters can be p ### Service -| Parameter | Description | Default | -| ----------------- | ---------------------------------------------------------------------------------------------- | ----------- | -| `service.enabled` | Whether to create a service. This requires the definition of at least one `ports.servicePort`. | `false` | -| `service.labels` | Additional service labels. | `{}` | -| `service.type` | Service type. | `ClusterIP` | +| Parameter | Description | Default | +|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------| +| `service.enabled` | Whether to create a service. This requires the definition of at least one `ports.servicePort`. This also configures `application.server` for the streams app | `false` | +| `service.labels` | Additional service labels. | `{}` | +| `service.type` | Service type. | `ClusterIP` | diff --git a/charts/streams-app/templates/deployment.yaml b/charts/streams-app/templates/deployment.yaml index 8c6d73fa..5b98e856 100644 --- a/charts/streams-app/templates/deployment.yaml +++ b/charts/streams-app/templates/deployment.yaml @@ -91,6 +91,16 @@ spec: - name: {{ printf "STREAMS_%s" $key | replace "." "_" | upper | quote }} value: {{ $value | quote }} {{- end }} + {{- range .Values.ports }} + {{- if .servicePort }} # TODO verify that there is at most one service port. Currently, if there are multiple service ports, the first one will be used + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: STREAMS_APPLICATION_SERVER + value: "$(POD_IP):{{ .containerPort }}" + {{- end }} + {{- end }} {{- if .Values.streams.staticMembership }} - name: STREAMS_GROUP_INSTANCE_ID valueFrom: diff --git a/charts/streams-app/templates/service.yaml b/charts/streams-app/templates/service.yaml index 0a4588c8..df54dc0a 100644 --- a/charts/streams-app/templates/service.yaml +++ b/charts/streams-app/templates/service.yaml @@ -24,6 +24,6 @@ spec: protocol: {{ .protocol }} {{- end }} {{- end }} - {{- end }} + {{- end }} type: {{ .Values.service.type }} {{- end }} From 66c0a31957a0dca6e659b2d86caa42521ba171aa Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Wed, 12 Jun 2024 08:49:22 +0000 Subject: [PATCH 22/24] [Gradle Release Plugin] - pre tag commit: '2.23.0'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 1b8c4ba2..c2962a86 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=2.22.2-SNAPSHOT +version=2.23.0 org.gradle.caching=true org.gradle.parallel=true kafkaVersion=3.6.1 From f1f9fc4a144a6892423520377516702dc4360bcc Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Wed, 12 Jun 2024 08:49:22 +0000 Subject: [PATCH 23/24] [Gradle Release Plugin] - new version commit: '2.23.1-SNAPSHOT'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c2962a86..9a9e33a9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=2.23.0 +version=2.23.1-SNAPSHOT org.gradle.caching=true org.gradle.parallel=true kafkaVersion=3.6.1 From c3c3fa23abfc6b3faca5ea4b9e032edfd784b8f4 Mon Sep 17 00:00:00 2001 From: bakdata-bot Date: Wed, 12 Jun 2024 08:51:05 +0000 Subject: [PATCH 24/24] Changelog for version 2.23.0 --- CHANGELOG.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8e58de2..24fc4e08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,15 @@ # Change Log -## [2.22.1](https://github.com/bakdata/streams-bootstrap/tree/2.22.1) (2024-06-11) -[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.22.1...2.22.1) +## [2.23.0](https://github.com/bakdata/streams-bootstrap/tree/2.23.0) (2024-06-12) +[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.23.0...2.23.0) + + +## [2.23.0](https://github.com/bakdata/streams-bootstrap/tree/2.23.0) (2024-06-12) +[View commits](https://github.com/bakdata/streams-bootstrap/compare/2.22.1...2.23.0) + +**Merged pull requests:** +- Add dynamic application.server config to streams app chart [\#214](https://github.com/bakdata/streams-bootstrap/pull/214) ([@philipp94831](https://github.com/philipp94831)) ## [2.22.1](https://github.com/bakdata/streams-bootstrap/tree/2.22.1) (2024-06-11) [View commits](https://github.com/bakdata/streams-bootstrap/compare/2.22.0...2.22.1)