From a316966325bf9bdd65613dcca37ee212549c273a Mon Sep 17 00:00:00 2001 From: vostres Date: Tue, 30 Apr 2024 13:57:46 +0200 Subject: [PATCH 01/20] Add terminationGracePeriodSeconds, podAnnotations, podLabels --- charts/streams-app/templates/deployment.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/streams-app/templates/deployment.yaml b/charts/streams-app/templates/deployment.yaml index cd900fa2..47f0fc67 100644 --- a/charts/streams-app/templates/deployment.yaml +++ b/charts/streams-app/templates/deployment.yaml @@ -48,7 +48,7 @@ spec: prometheus.io/scrape: "true" prometheus.io/port: {{ .Values.prometheus.jmx.port | quote }} {{- end }} - {{- range $key, $value := .Values.annotations }} + {{- range $key, $value := .Values.podAnnotations }} {{ $key | quote }}: {{ $value | quote }} {{- end }} {{- if and .Values.autoscaling.consumerGroup (not .Values.annotations.consumerGroup) }} @@ -58,7 +58,7 @@ spec: labels: app: {{ template "streams-app.name" . }} release: {{ .Release.Name }} - {{- range $key, $value := .Values.labels }} + {{- range $key, $value := .Values.podLabels }} {{ $key }}: {{ $value }} {{- end }} spec: @@ -99,6 +99,7 @@ spec: {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} {{- if .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml .Values.imagePullSecrets | nindent 8 }} From 02dc16f0512a44ad90a0926c6120d84138287e0c Mon Sep 17 00:00:00 2001 From: vostres Date: Tue, 30 Apr 2024 16:31:57 +0200 Subject: [PATCH 02/20] Add podAnnotations, podLabels, terminationGracePeriodSeconds to values.yaml --- charts/streams-app/values.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/charts/streams-app/values.yaml b/charts/streams-app/values.yaml index 4455100e..83c022f1 100644 --- a/charts/streams-app/values.yaml +++ b/charts/streams-app/values.yaml @@ -200,3 +200,10 @@ persistence: ## GKE, AWS & OpenStack) ## # storageClass: "" + +podAnnotations: [] + +podLabels: [] + +terminationGracePeriodSeconds: 300 + From 5d560dea12622f5ffdcf86d098b47a72efa1c3a4 Mon Sep 17 00:00:00 2001 From: vostres Date: Tue, 30 Apr 2024 16:33:41 +0200 Subject: [PATCH 03/20] Refactor if-clauses to check Values.podAnnotations --- charts/streams-app/templates/deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/streams-app/templates/deployment.yaml b/charts/streams-app/templates/deployment.yaml index 47f0fc67..ce0da4d2 100644 --- a/charts/streams-app/templates/deployment.yaml +++ b/charts/streams-app/templates/deployment.yaml @@ -39,7 +39,7 @@ spec: release: {{ .Release.Name }} template: metadata: - {{- if or (or (or .Values.awsRole .Values.prometheus.jmx.enabled) .Values.autoscaling.consumerGroup) .Values.annotations }} + {{- if or (or (or .Values.awsRole .Values.prometheus.jmx.enabled) .Values.autoscaling.consumerGroup) .Values.podAnnotations }} annotations: {{- if .Values.awsRole }} iam.amazonaws.com/role: {{ .Values.awsRole }} @@ -51,7 +51,7 @@ spec: {{- range $key, $value := .Values.podAnnotations }} {{ $key | quote }}: {{ $value | quote }} {{- end }} - {{- if and .Values.autoscaling.consumerGroup (not .Values.annotations.consumerGroup) }} + {{- if and .Values.autoscaling.consumerGroup (not .Values.podAnnotations.consumerGroup) }} consumerGroup: {{ .Values.autoscaling.consumerGroup | quote }} {{- end }} {{- end }} From 761df1a4cfe7cebb7559dce3d148cf8448f867b4 Mon Sep 17 00:00:00 2001 From: vostres Date: Tue, 7 May 2024 13:39:18 +0200 Subject: [PATCH 04/20] Remove logic for terminationGracePeriodSeconds --- charts/streams-app/templates/deployment.yaml | 1 - charts/streams-app/values.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/charts/streams-app/templates/deployment.yaml b/charts/streams-app/templates/deployment.yaml index ce0da4d2..9b53f7c0 100644 --- a/charts/streams-app/templates/deployment.yaml +++ b/charts/streams-app/templates/deployment.yaml @@ -99,7 +99,6 @@ spec: {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} - terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} {{- if .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml .Values.imagePullSecrets | nindent 8 }} diff --git a/charts/streams-app/values.yaml b/charts/streams-app/values.yaml index 83c022f1..2fa9f558 100644 --- a/charts/streams-app/values.yaml +++ b/charts/streams-app/values.yaml @@ -205,5 +205,4 @@ podAnnotations: [] podLabels: [] -terminationGracePeriodSeconds: 300 From da2982d6bd8a247b51313f7a23db33e845417490 Mon Sep 17 00:00:00 2001 From: vostres Date: Tue, 7 May 2024 14:30:10 +0200 Subject: [PATCH 05/20] Add podAnnotations/Labels to producer-app-cleanup-job --- charts/producer-app-cleanup-job/templates/job.yaml | 6 +++--- charts/producer-app-cleanup-job/values.yaml | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/charts/producer-app-cleanup-job/templates/job.yaml b/charts/producer-app-cleanup-job/templates/job.yaml index add670bd..428de1e4 100644 --- a/charts/producer-app-cleanup-job/templates/job.yaml +++ b/charts/producer-app-cleanup-job/templates/job.yaml @@ -15,19 +15,19 @@ spec: ttlSecondsAfterFinished: 30 template: metadata: - {{- if or .Values.awsRole .Values.annotations }} + {{- if or .Values.awsRole .Values.podAnnotations }} annotations: {{- if .Values.awsRole }} iam.amazonaws.com/role: {{ .Values.awsRole }} {{- end }} - {{- range $key, $value := .Values.annotations }} + {{- range $key, $value := .Values.podAnnotations }} {{ $key | quote }}: {{ $value | quote }} {{- end }} {{- end }} labels: app: {{ template "producer-app-cleanup-job.name" . }} release: {{ .Release.Name }} - {{- range $key, $value := .Values.labels }} + {{- range $key, $value := .Values.podLabels }} {{ $key }}: {{ $value }} {{- end }} spec: diff --git a/charts/producer-app-cleanup-job/values.yaml b/charts/producer-app-cleanup-job/values.yaml index fb2eac64..37729f3d 100644 --- a/charts/producer-app-cleanup-job/values.yaml +++ b/charts/producer-app-cleanup-job/values.yaml @@ -87,3 +87,7 @@ javaOptions: # - "-XX:MinRAMPercentage=50.0" backoffLimit: 6 + +podAnnotations: [] + +podLabels: [] From 45788ad47e752e85d0131405b1822395e0be3bc2 Mon Sep 17 00:00:00 2001 From: vostres Date: Tue, 7 May 2024 14:30:27 +0200 Subject: [PATCH 06/20] Add podAnnotations/Labels to streams-app-cleanup-job --- charts/streams-app-cleanup-job/templates/job.yaml | 6 +++--- charts/streams-app-cleanup-job/values.yaml | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/charts/streams-app-cleanup-job/templates/job.yaml b/charts/streams-app-cleanup-job/templates/job.yaml index ec5af2f7..2f6e4654 100644 --- a/charts/streams-app-cleanup-job/templates/job.yaml +++ b/charts/streams-app-cleanup-job/templates/job.yaml @@ -15,19 +15,19 @@ spec: ttlSecondsAfterFinished: 30 template: metadata: - {{- if or .Values.awsRole .Values.annotations }} + {{- if or .Values.awsRole .Values.podAnnotations }} annotations: {{- if .Values.awsRole }} iam.amazonaws.com/role: {{ .Values.awsRole }} {{- end }} - {{- range $key, $value := .Values.annotations }} + {{- range $key, $value := .Values.podAnnotations }} {{ $key | quote }}: {{ $value | quote }} {{- end }} {{- end }} labels: app: {{ template "streams-app-cleanup-job.name" . }} release: {{ .Release.Name }} - {{- range $key, $value := .Values.labels }} + {{- range $key, $value := .Values.podLabels }} {{ $key }}: {{ $value }} {{- end }} spec: diff --git a/charts/streams-app-cleanup-job/values.yaml b/charts/streams-app-cleanup-job/values.yaml index 9fa76774..f6ce2442 100644 --- a/charts/streams-app-cleanup-job/values.yaml +++ b/charts/streams-app-cleanup-job/values.yaml @@ -100,3 +100,7 @@ javaOptions: # - "-XX:MinRAMPercentage=50.0" backoffLimit: 6 + +podAnnotations: [] + +podLabels: [] From 5625c6442f90dadb3dd3e3bd0a7f44e2e4bfa75f Mon Sep 17 00:00:00 2001 From: vostres Date: Tue, 7 May 2024 14:30:44 +0200 Subject: [PATCH 07/20] Add podAnnotations/Labels to producer-app --- charts/producer-app/templates/pod.yaml | 6 +++--- charts/producer-app/values.yaml | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/charts/producer-app/templates/pod.yaml b/charts/producer-app/templates/pod.yaml index c97ffb59..aee8fb13 100644 --- a/charts/producer-app/templates/pod.yaml +++ b/charts/producer-app/templates/pod.yaml @@ -1,19 +1,19 @@ {{- define "producer-app.podTemplate" -}} {{- $root := . -}} metadata: -{{- if or .Values.awsRole .Values.annotations }} +{{- if or .Values.awsRole .Values.podAnnotations }} annotations: {{- if .Values.awsRole }} iam.amazonaws.com/role: {{ .Values.awsRole }} {{- end }} - {{- range $key, $value := .Values.annotations }} + {{- range $key, $value := .Values.podAnnotations }} {{ $key | quote }}: {{ $value | quote }} {{- end }} {{- end }} labels: app: {{ template "producer-app.name" . }} release: {{ .Release.Name }} - {{- range $key, $value := .Values.labels }} + {{- range $key, $value := .Values.poLabels }} {{ $key }}: {{ $value }} {{- end }} spec: diff --git a/charts/producer-app/values.yaml b/charts/producer-app/values.yaml index 3f2c088f..b11d08a3 100644 --- a/charts/producer-app/values.yaml +++ b/charts/producer-app/values.yaml @@ -121,3 +121,7 @@ livenessProbe: {} # Arbitrary Probe v1 definition for producer: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#probe-v1-core readinessProbe: {} + +podAnnotations: [] + +podLabels: [] From df0abe95d754fa44ba3c140fd1266bbb6426c2a5 Mon Sep 17 00:00:00 2001 From: vostres Date: Tue, 7 May 2024 14:41:08 +0200 Subject: [PATCH 08/20] Remove empty lines EOF --- charts/streams-app/values.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/charts/streams-app/values.yaml b/charts/streams-app/values.yaml index 2fa9f558..d89ec98f 100644 --- a/charts/streams-app/values.yaml +++ b/charts/streams-app/values.yaml @@ -204,5 +204,3 @@ persistence: podAnnotations: [] podLabels: [] - - From a69d44b078cca15694581e08cc6a256aa55bbaad Mon Sep 17 00:00:00 2001 From: vostres Date: Tue, 7 May 2024 14:41:17 +0200 Subject: [PATCH 09/20] Fix typo --- charts/producer-app/templates/pod.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/producer-app/templates/pod.yaml b/charts/producer-app/templates/pod.yaml index aee8fb13..ede18bda 100644 --- a/charts/producer-app/templates/pod.yaml +++ b/charts/producer-app/templates/pod.yaml @@ -13,7 +13,7 @@ metadata: labels: app: {{ template "producer-app.name" . }} release: {{ .Release.Name }} - {{- range $key, $value := .Values.poLabels }} + {{- range $key, $value := .Values.podLabels }} {{ $key }}: {{ $value }} {{- end }} spec: From 87c60fe7fc20526657cba26569af1e01e7a60adf Mon Sep 17 00:00:00 2001 From: vostres Date: Wed, 8 May 2024 10:43:40 +0200 Subject: [PATCH 10/20] Update README.md for streams-app chart --- charts/streams-app/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/charts/streams-app/README.md b/charts/streams-app/README.md index fe806799..14d51903 100644 --- a/charts/streams-app/README.md +++ b/charts/streams-app/README.md @@ -11,12 +11,12 @@ 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 | -| `annotations` | Map of custom annotations to attach to the pod spec. | `{}` | -| `labels` | Map of custom labels to attach to the pod spec. | `{}` | +| `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/) | `{}` | | `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. | | @@ -28,6 +28,8 @@ Alternatively, a YAML file that specifies the values for the parameters can be p | `ports.servicePort` | Number of the port of the service (optional). See [service definition](#service) | | | `livenessProbe` | Probe v1 definition for streams-app: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#probe-v1-core | `{}` | | `readinessProbe` | Probe v1 definition for streams-app: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#probe-v1-core | `{}` | +| `podAnnotations` | Map of custom annotations to attach to the pod spec. | `[]` | +| `podLabels` | Map of custom labels to attach to the pod spec. | `[]` | ### Storage From 862fc1b9fe3e33008e9456518f58ddcfa21a8b67 Mon Sep 17 00:00:00 2001 From: vostres Date: Wed, 8 May 2024 10:43:50 +0200 Subject: [PATCH 11/20] Update README.md for producer-app chart --- charts/producer-app/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/charts/producer-app/README.md b/charts/producer-app/README.md index 91e5c59b..d1d25746 100644 --- a/charts/producer-app/README.md +++ b/charts/producer-app/README.md @@ -11,11 +11,11 @@ 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 pod spec. | `{}` | -| `labels` | Map of custom labels to attach to the pod spec. | `{}` | +| `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). | `{}` | | `deployment` | Deploy the producer as a Kubernetes Deployment (thereby ignoring Job-related configurations) | false | @@ -32,6 +32,8 @@ Alternatively, a YAML file that specifies the values for the parameters can be p | `ports.servicePort` | Number of the port of the service (optional). See [service definition](#service) | | | `livenessProbe` | Probe v1 definition for producer-app: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#probe-v1-core | `{}` | | `readinessProbe` | Probe v1 definition for producer-app: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#probe-v1-core | `{}` | +| `podAnnotations` | Map of custom annotations to attach to the pod spec. | `[]` | +| `podLabels` | Map of custom labels to attach to the pod spec. | `[]` | ### Image From 579615646dfc6e4a26a0149dc8a2f42f21397c62 Mon Sep 17 00:00:00 2001 From: vostres Date: Wed, 8 May 2024 10:56:39 +0200 Subject: [PATCH 12/20] Add Values.annotations to the metadata for cleanup jobs --- charts/producer-app-cleanup-job/templates/job.yaml | 6 ++++++ charts/streams-app-cleanup-job/templates/job.yaml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/charts/producer-app-cleanup-job/templates/job.yaml b/charts/producer-app-cleanup-job/templates/job.yaml index 428de1e4..e8a5fcf7 100644 --- a/charts/producer-app-cleanup-job/templates/job.yaml +++ b/charts/producer-app-cleanup-job/templates/job.yaml @@ -4,6 +4,12 @@ apiVersion: batch/v1 kind: Job metadata: name: {{ template "producer-app-cleanup-job.fullname" . }} +{{ - if .Values.annotations }} + annotations: + {{ - range $key, $value := .Values.annotations }} + {{ $key | quote }}: {{ $value | quote }} + {{ - end }} +{{ - end }} labels: app: {{ template "producer-app-cleanup-job.name" . }} chart: {{ template "producer-app-cleanup-job.chart" . }} diff --git a/charts/streams-app-cleanup-job/templates/job.yaml b/charts/streams-app-cleanup-job/templates/job.yaml index 2f6e4654..8ba8adbc 100644 --- a/charts/streams-app-cleanup-job/templates/job.yaml +++ b/charts/streams-app-cleanup-job/templates/job.yaml @@ -4,6 +4,12 @@ apiVersion: batch/v1 kind: Job metadata: name: {{ template "streams-app-cleanup-job.fullname" . }} +{{ - if .Values.annotations }} + annotations: + {{ - range $key, $value := .Values.annotations }} + {{ $key | quote }}: {{ $value | quote }} + {{ - end }} +{{ - end }} labels: app: {{ template "streams-app-cleanup-job.name" . }} chart: {{ template "streams-app-cleanup-job.chart" . }} From a558bacdf15cfeaca409eba13c491492c77dfdc7 Mon Sep 17 00:00:00 2001 From: vostres Date: Mon, 13 May 2024 12:15:23 +0200 Subject: [PATCH 13/20] Remove Values.podAnnotations.consumerGroup --- charts/streams-app/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/streams-app/templates/deployment.yaml b/charts/streams-app/templates/deployment.yaml index 9b53f7c0..9702f956 100644 --- a/charts/streams-app/templates/deployment.yaml +++ b/charts/streams-app/templates/deployment.yaml @@ -51,7 +51,7 @@ spec: {{- range $key, $value := .Values.podAnnotations }} {{ $key | quote }}: {{ $value | quote }} {{- end }} - {{- if and .Values.autoscaling.consumerGroup (not .Values.podAnnotations.consumerGroup) }} + {{- if and .Values.autoscaling.consumerGroup (not .Values.annotations.consumerGroup) }} consumerGroup: {{ .Values.autoscaling.consumerGroup | quote }} {{- end }} {{- end }} From 29115dd73a5c5ee5a34949b688e7b2c45d6d7e1e Mon Sep 17 00:00:00 2001 From: vostres Date: Mon, 13 May 2024 12:18:32 +0200 Subject: [PATCH 14/20] Add Values.annotations to job.yaml for producer-app --- charts/producer-app/templates/job.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/charts/producer-app/templates/job.yaml b/charts/producer-app/templates/job.yaml index f4b5e937..553257e5 100644 --- a/charts/producer-app/templates/job.yaml +++ b/charts/producer-app/templates/job.yaml @@ -13,6 +13,12 @@ kind: Job {{- end }} metadata: name: {{ template "producer-app.fullname" . }} +{{ - if .Values.annotations }} + annotations: + {{ - range $key, $value := .Values.annotations }} + {{ $key | quote }}: {{ $value | quote }} + {{ - end }} +{{ - end }} labels: app: {{ template "producer-app.name" . }} chart: {{ template "producer-app.chart" . }} From a09ce6d735dc6bb2eca7c5a80d24715d19a44296 Mon Sep 17 00:00:00 2001 From: vostres Date: Mon, 13 May 2024 12:23:45 +0200 Subject: [PATCH 15/20] Update annotations/labels rclone-copy chart --- charts/rclone-copy/templates/rclone-cron.yaml | 12 +++++++++--- charts/rclone-copy/values.yaml | 4 ++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/charts/rclone-copy/templates/rclone-cron.yaml b/charts/rclone-copy/templates/rclone-cron.yaml index 1d265379..d2dc7738 100644 --- a/charts/rclone-copy/templates/rclone-cron.yaml +++ b/charts/rclone-copy/templates/rclone-cron.yaml @@ -6,6 +6,12 @@ apiVersion: batch/v1beta1 kind: CronJob metadata: name: {{ template "rclone-copy.fullname" . }} +{{ - if .Values.annotations }} + annotations: + {{ - range $key, $value := .Values.annotations }} + {{ $key | quote } }: { { $value | quote }} + {{ - end }} +{{ - end }} labels: app: {{ template "rclone-copy.name" . }} chart: {{ template "rclone-copy.chart" . }} @@ -23,19 +29,19 @@ spec: spec: template: metadata: - {{- if or .Values.awsRole .Values.annotations }} + {{- if or .Values.awsRole .Values.podAnnotations }} annotations: {{- if .Values.awsRole }} iam.amazonaws.com/role: {{ .Values.awsRole }} {{- end }} - {{- range $key, $value := .Values.annotations }} + {{- range $key, $value := .Values.podAnnotations }} {{ $key | quote }}: {{ $value | quote }} {{- end }} {{- end }} labels: app: {{ template "rclone-copy.name" . }} release: {{ .Release.Name }} - {{- range $key, $value := .Values.labels }} + {{- range $key, $value := .Values.podLabels }} {{ $key }}: {{ $value }} {{- end }} spec: diff --git a/charts/rclone-copy/values.yaml b/charts/rclone-copy/values.yaml index 9572f6d2..2f46194f 100644 --- a/charts/rclone-copy/values.yaml +++ b/charts/rclone-copy/values.yaml @@ -89,3 +89,7 @@ resources: successfulJobsHistoryLimit: 1 failedJobsHistoryLimit: 1 backoffLimit: 6 + +podAnnotations: [] + +podLabels: [] From 95932fb7c6483d7814408b2d1ab79e3a7c8f859d Mon Sep 17 00:00:00 2001 From: vostres Date: Mon, 13 May 2024 12:24:57 +0200 Subject: [PATCH 16/20] Delete space --- charts/rclone-copy/templates/rclone-cron.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/rclone-copy/templates/rclone-cron.yaml b/charts/rclone-copy/templates/rclone-cron.yaml index d2dc7738..cc40c39a 100644 --- a/charts/rclone-copy/templates/rclone-cron.yaml +++ b/charts/rclone-copy/templates/rclone-cron.yaml @@ -9,7 +9,7 @@ metadata: {{ - if .Values.annotations }} annotations: {{ - range $key, $value := .Values.annotations }} - {{ $key | quote } }: { { $value | quote }} + {{ $key | quote }}: {{ $value | quote }} {{ - end }} {{ - end }} labels: From d2eb12dfea67942d6808b4bd5ee8b6fed58e156a Mon Sep 17 00:00:00 2001 From: vostres Date: Mon, 13 May 2024 12:32:46 +0200 Subject: [PATCH 17/20] Add spaces to streams-app-cleanup-job chart --- charts/streams-app-cleanup-job/templates/job.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/streams-app-cleanup-job/templates/job.yaml b/charts/streams-app-cleanup-job/templates/job.yaml index 8ba8adbc..ae6f9370 100644 --- a/charts/streams-app-cleanup-job/templates/job.yaml +++ b/charts/streams-app-cleanup-job/templates/job.yaml @@ -4,12 +4,12 @@ apiVersion: batch/v1 kind: Job metadata: name: {{ template "streams-app-cleanup-job.fullname" . }} -{{ - if .Values.annotations }} + {{ - if .Values.annotations }} annotations: {{ - range $key, $value := .Values.annotations }} {{ $key | quote }}: {{ $value | quote }} {{ - end }} -{{ - end }} + {{ - end }} labels: app: {{ template "streams-app-cleanup-job.name" . }} chart: {{ template "streams-app-cleanup-job.chart" . }} From 327f8240678cc398f0500d6fcc69593158e320a8 Mon Sep 17 00:00:00 2001 From: vostres Date: Mon, 13 May 2024 12:38:58 +0200 Subject: [PATCH 18/20] Delete spaces --- charts/streams-app-cleanup-job/templates/job.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/streams-app-cleanup-job/templates/job.yaml b/charts/streams-app-cleanup-job/templates/job.yaml index ae6f9370..8cfa1c08 100644 --- a/charts/streams-app-cleanup-job/templates/job.yaml +++ b/charts/streams-app-cleanup-job/templates/job.yaml @@ -4,12 +4,12 @@ apiVersion: batch/v1 kind: Job metadata: name: {{ template "streams-app-cleanup-job.fullname" . }} - {{ - if .Values.annotations }} +{{- if .Values.annotations }} annotations: - {{ - range $key, $value := .Values.annotations }} + {{- range $key, $value := .Values.annotations }} {{ $key | quote }}: {{ $value | quote }} - {{ - end }} - {{ - end }} + {{- end }} +{{- end }} labels: app: {{ template "streams-app-cleanup-job.name" . }} chart: {{ template "streams-app-cleanup-job.chart" . }} From 7cfa7d891c2503f655d51b390a176c7bcc1d09a9 Mon Sep 17 00:00:00 2001 From: vostres Date: Mon, 13 May 2024 14:35:20 +0200 Subject: [PATCH 19/20] Delete blank spaces before "-" --- charts/producer-app-cleanup-job/templates/job.yaml | 8 ++++---- charts/producer-app/templates/job.yaml | 8 ++++---- charts/rclone-copy/templates/rclone-cron.yaml | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/charts/producer-app-cleanup-job/templates/job.yaml b/charts/producer-app-cleanup-job/templates/job.yaml index e8a5fcf7..95019cb2 100644 --- a/charts/producer-app-cleanup-job/templates/job.yaml +++ b/charts/producer-app-cleanup-job/templates/job.yaml @@ -4,12 +4,12 @@ apiVersion: batch/v1 kind: Job metadata: name: {{ template "producer-app-cleanup-job.fullname" . }} -{{ - if .Values.annotations }} +{{- if .Values.annotations }} annotations: - {{ - range $key, $value := .Values.annotations }} + {{- range $key, $value := .Values.annotations }} {{ $key | quote }}: {{ $value | quote }} - {{ - end }} -{{ - end }} + {{- end }} +{{- end }} labels: app: {{ template "producer-app-cleanup-job.name" . }} chart: {{ template "producer-app-cleanup-job.chart" . }} diff --git a/charts/producer-app/templates/job.yaml b/charts/producer-app/templates/job.yaml index 553257e5..f884c708 100644 --- a/charts/producer-app/templates/job.yaml +++ b/charts/producer-app/templates/job.yaml @@ -13,12 +13,12 @@ kind: Job {{- end }} metadata: name: {{ template "producer-app.fullname" . }} -{{ - if .Values.annotations }} +{{- if .Values.annotations }} annotations: - {{ - range $key, $value := .Values.annotations }} + {{- range $key, $value := .Values.annotations }} {{ $key | quote }}: {{ $value | quote }} - {{ - end }} -{{ - end }} + {{- end }} +{{- end }} labels: app: {{ template "producer-app.name" . }} chart: {{ template "producer-app.chart" . }} diff --git a/charts/rclone-copy/templates/rclone-cron.yaml b/charts/rclone-copy/templates/rclone-cron.yaml index cc40c39a..a7e20e58 100644 --- a/charts/rclone-copy/templates/rclone-cron.yaml +++ b/charts/rclone-copy/templates/rclone-cron.yaml @@ -6,12 +6,12 @@ apiVersion: batch/v1beta1 kind: CronJob metadata: name: {{ template "rclone-copy.fullname" . }} -{{ - if .Values.annotations }} +{{- if .Values.annotations }} annotations: - {{ - range $key, $value := .Values.annotations }} + {{- range $key, $value := .Values.annotations }} {{ $key | quote }}: {{ $value | quote }} - {{ - end }} -{{ - end }} + {{- end }} +{{- end }} labels: app: {{ template "rclone-copy.name" . }} chart: {{ template "rclone-copy.chart" . }} From b2599c38337db28dfc29dc395cff3430915c4a7c Mon Sep 17 00:00:00 2001 From: vostres Date: Mon, 13 May 2024 14:35:42 +0200 Subject: [PATCH 20/20] Delete consumerGroup for pod --- charts/streams-app/templates/deployment.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/charts/streams-app/templates/deployment.yaml b/charts/streams-app/templates/deployment.yaml index 9702f956..2de019de 100644 --- a/charts/streams-app/templates/deployment.yaml +++ b/charts/streams-app/templates/deployment.yaml @@ -39,7 +39,7 @@ spec: release: {{ .Release.Name }} template: metadata: - {{- if or (or (or .Values.awsRole .Values.prometheus.jmx.enabled) .Values.autoscaling.consumerGroup) .Values.podAnnotations }} + {{- if or .Values.awsRole .Values.prometheus.jmx.enabled .Values.podAnnotations }} annotations: {{- if .Values.awsRole }} iam.amazonaws.com/role: {{ .Values.awsRole }} @@ -51,9 +51,6 @@ spec: {{- range $key, $value := .Values.podAnnotations }} {{ $key | quote }}: {{ $value | quote }} {{- end }} - {{- if and .Values.autoscaling.consumerGroup (not .Values.annotations.consumerGroup) }} - consumerGroup: {{ .Values.autoscaling.consumerGroup | quote }} - {{- end }} {{- end }} labels: app: {{ template "streams-app.name" . }}