From e29ea1106af60e0cce7c63e51b44a55fed7e9776 Mon Sep 17 00:00:00 2001 From: Gabriel Mainberger Date: Fri, 16 Sep 2022 14:09:33 +0200 Subject: [PATCH] Change CronJob API Version to batch/v1 and PodDisruptionBudget to policy/v1 PodDisruptionBudget policy/v1beta1 is removed in K8s v1.25 CronJob batch/v1beta1 is removed in K8s v1.25 https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-25 --- kube.libsonnet | 4 ++-- tests/golden/test-simple-validate.pass.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kube.libsonnet b/kube.libsonnet index 418a76a..da9e89a 100644 --- a/kube.libsonnet +++ b/kube.libsonnet @@ -265,7 +265,7 @@ assert (!$._assert) || (!self.tty || self.stdin) : "tty=true requires stdin=true", }, - PodDisruptionBudget(name): $._Object("policy/v1beta1", "PodDisruptionBudget", name) { + PodDisruptionBudget(name): $._Object("policy/v1", "PodDisruptionBudget", name) { local this = self, target_pod:: error "target_pod required", spec: { @@ -528,7 +528,7 @@ }, }, - CronJob(name): $._Object("batch/v1beta1", "CronJob", name) { + CronJob(name): $._Object("batch/v1", "CronJob", name) { local cronjob = self, spec: { diff --git a/tests/golden/test-simple-validate.pass.json b/tests/golden/test-simple-validate.pass.json index 6e442cf..d271cd6 100644 --- a/tests/golden/test-simple-validate.pass.json +++ b/tests/golden/test-simple-validate.pass.json @@ -17,7 +17,7 @@ } }, { - "apiVersion": "batch/v1beta1", + "apiVersion": "batch/v1", "kind": "CronJob", "metadata": { "annotations": { }, @@ -200,7 +200,7 @@ } }, { - "apiVersion": "policy/v1beta1", + "apiVersion": "policy/v1", "kind": "PodDisruptionBudget", "metadata": { "annotations": { },