From 80517355c25377e4a966cd136512612e526617dd Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Thu, 4 May 2023 15:09:04 +0200 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F(apps)=20use=20batch/v1=20api?= =?UTF-8?q?=20in=20cronjob=20manifests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The batch/v1beta1 API is deprecated since kubernetes 1.21 and is removed in version 1.25. We can upgrade the manifests to use the batch/v1 api now. --- CHANGELOG.md | 1 + apps/ashley/templates/services/app/cronjob_update_index.yml.j2 | 2 +- apps/hello/templates/services/app/cronjob_hello.yml.j2 | 2 +- apps/nextcloud/templates/services/app/cronjob_cron.yml.j2 | 2 +- tasks/delete_app.yml | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 484762ba..dc28e959 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Versioning](http://semver.org/spec/v2.0.0.html). ### Changed - Upgrade `ansible` to `7.2.0` +- Use batch/v1 api in cronjob_pipeline manifest ## [6.16.0] - 2023-02-02 diff --git a/apps/ashley/templates/services/app/cronjob_update_index.yml.j2 b/apps/ashley/templates/services/app/cronjob_update_index.yml.j2 index 4b563a7b..4d48271b 100644 --- a/apps/ashley/templates/services/app/cronjob_update_index.yml.j2 +++ b/apps/ashley/templates/services/app/cronjob_update_index.yml.j2 @@ -1,4 +1,4 @@ -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: labels: diff --git a/apps/hello/templates/services/app/cronjob_hello.yml.j2 b/apps/hello/templates/services/app/cronjob_hello.yml.j2 index b1de5075..5a5f633b 100644 --- a/apps/hello/templates/services/app/cronjob_hello.yml.j2 +++ b/apps/hello/templates/services/app/cronjob_hello.yml.j2 @@ -1,4 +1,4 @@ -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: name: "cronjob-hello-{{ deployment_stamp }}" diff --git a/apps/nextcloud/templates/services/app/cronjob_cron.yml.j2 b/apps/nextcloud/templates/services/app/cronjob_cron.yml.j2 index 3746e428..4f9c5ab7 100644 --- a/apps/nextcloud/templates/services/app/cronjob_cron.yml.j2 +++ b/apps/nextcloud/templates/services/app/cronjob_cron.yml.j2 @@ -1,4 +1,4 @@ -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: name: nextcloud-cron-{{ deployment_stamp }} diff --git a/tasks/delete_app.yml b/tasks/delete_app.yml index 48b6f177..24d14496 100644 --- a/tasks/delete_app.yml +++ b/tasks/delete_app.yml @@ -12,7 +12,7 @@ - { kind: "ReplicationController", api_version: "v1" } - { kind: "StatefulSet", api_version: "v1" } - { kind: "Job", api_version: "v1" } - - { kind: "CronJob", api_version: "v1beta1" } + - { kind: "CronJob", api_version: "v1" } # Pods must be deleted after all kind of objects that can spawn new pods - { kind: "Pod", api_version: "v1" } - { kind: "Service", api_version: "v1" }