From 71dee03b5cc329db130ce425d35c9de172d55566 Mon Sep 17 00:00:00 2001 From: Aram Karapetyan Date: Tue, 23 Jan 2024 17:27:45 +0400 Subject: [PATCH 1/2] fix(fix-cronjob): Fix Cronjob --- charts/base-cronjob/Chart.yaml | 4 ++-- charts/base-cronjob/templates/cronjob.yaml | 7 +++++++ charts/base-cronjob/values.yaml | 1 + charts/base/Chart.yaml | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/charts/base-cronjob/Chart.yaml b/charts/base-cronjob/Chart.yaml index 7f64aac..ab296bf 100644 --- a/charts/base-cronjob/Chart.yaml +++ b/charts/base-cronjob/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.13 +version: 0.1.14 # This is the version number of the application being deployed. This version number should be @@ -23,4 +23,4 @@ version: 0.1.13 # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.1.13" +appVersion: "0.1.14" diff --git a/charts/base-cronjob/templates/cronjob.yaml b/charts/base-cronjob/templates/cronjob.yaml index f8426d8..546f60f 100644 --- a/charts/base-cronjob/templates/cronjob.yaml +++ b/charts/base-cronjob/templates/cronjob.yaml @@ -15,10 +15,17 @@ metadata: {{- end }} spec: schedule: {{ $job.schedule | quote}} + concurrencyPolicy: {{ $job.concurrencyPolicy }} jobTemplate: spec: template: metadata: + {{- if $job.labels }} + labels: + {{- range $key, $value := $job.labels }} + {{ $value.name }}: {{ $value.value | quote}} + {{- end }} + {{- end }} annotations: configmap: "{{ $job.config | toYaml | sha256sum | trunc 8 }}" spec: diff --git a/charts/base-cronjob/values.yaml b/charts/base-cronjob/values.yaml index 36c1077..d33f63c 100644 --- a/charts/base-cronjob/values.yaml +++ b/charts/base-cronjob/values.yaml @@ -5,6 +5,7 @@ jobs: serviceAccountName: create: true name: "sa-1" + concurrencyPolicy: Forbid image: registry: docker.io repository: busybox diff --git a/charts/base/Chart.yaml b/charts/base/Chart.yaml index f01c750..01d958f 100644 --- a/charts/base/Chart.yaml +++ b/charts/base/Chart.yaml @@ -15,10 +15,10 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.56 +version: 0.1.57 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.1.56" +appVersion: "0.1.57" From 2a82d579b7e7857d2b0676b25c022b99d45d0746 Mon Sep 17 00:00:00 2001 From: Aram Karapetyan Date: Wed, 24 Jan 2024 10:25:45 +0400 Subject: [PATCH 2/2] fix(fix-cronjob): Fix Cronjob --- charts/base-cronjob/templates/cronjob.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/base-cronjob/templates/cronjob.yaml b/charts/base-cronjob/templates/cronjob.yaml index 546f60f..df616da 100644 --- a/charts/base-cronjob/templates/cronjob.yaml +++ b/charts/base-cronjob/templates/cronjob.yaml @@ -12,6 +12,7 @@ metadata: {{- range $key, $value := $job.labels }} {{ $value.name }}: {{ $value.value | quote}} {{- end }} + app-name: {{ $job.name | quote}} {{- end }} spec: schedule: {{ $job.schedule | quote}} @@ -25,6 +26,7 @@ spec: {{- range $key, $value := $job.labels }} {{ $value.name }}: {{ $value.value | quote}} {{- end }} + app-name: {{ $job.name | quote}} {{- end }} annotations: configmap: "{{ $job.config | toYaml | sha256sum | trunc 8 }}"