From 2fb32a453cd2b95519b27434923f478421edd2df Mon Sep 17 00:00:00 2001 From: James Guthrie Date: Sun, 17 Nov 2019 03:18:44 +0100 Subject: [PATCH] Set Cron* types and defaults to v1beta1 (#88) According to the Kubernetes documentation [1]: Note: CronJob resource in batch/v2alpha1 API group has been deprecated starting from cluster version 1.8. You should switch to using batch/v1beta1, instead, which is enabled by default in the API server. Examples in this document use batch/v1beta1 in all examples. [1]: https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/ --- defaults.dhall | 8 ++++---- dhall-kubernetes-generator/src/Dhall/Kubernetes/Data.hs | 8 ++++---- examples/deployment.dhall | 2 +- examples/deploymentSimple.dhall | 2 +- examples/ingress.dhall | 2 +- examples/service.dhall | 2 +- types.dhall | 8 ++++---- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/defaults.dhall b/defaults.dhall index 0919076c..e4771a29 100644 --- a/defaults.dhall +++ b/defaults.dhall @@ -171,13 +171,13 @@ , JobStatus = ./defaults/io.k8s.api.batch.v1.JobStatus.dhall sha256:a8d8e591e2fe1686c47015ccb1ec4d526b2556e393d2971d9df4f2d670c66f1e , CronJob = - ./defaults/io.k8s.api.batch.v2alpha1.CronJob.dhall sha256:22bd1bc427a0173d7c0f4e0f2c13af682cf70bfdd82ecb0e66df85ed6129e584 + ./defaults/io.k8s.api.batch.v1beta1.CronJob.dhall sha256:392527fc2b80465f7fcc5ab9b4180c1541b0fceb58e584b65f67b7b7a3a70c3a , CronJobList = - ./defaults/io.k8s.api.batch.v2alpha1.CronJobList.dhall sha256:26a29a0202fd41a94d4261ab037286a03dd8c6a41f518ec251bd68fdb7147b6b + ./defaults/io.k8s.api.batch.v1beta1.CronJobList.dhall sha256:72a6a8157f567f5a60b8b34eea8b11e6199ddbeaefa7fcac5a645fa61257f645 , CronJobSpec = - ./defaults/io.k8s.api.batch.v2alpha1.CronJobSpec.dhall sha256:31b776fcebe0d3da14c9af5c5e96a35fe3b73883717a1cd26234f48064950325 + ./defaults/io.k8s.api.batch.v1beta1.CronJobSpec.dhall sha256:31b776fcebe0d3da14c9af5c5e96a35fe3b73883717a1cd26234f48064950325 , CronJobStatus = - ./defaults/io.k8s.api.batch.v2alpha1.CronJobStatus.dhall sha256:74d9ee0419f4a414496b1195a1fa782696a07d131edf8194fa2d3dae5253a70b + ./defaults/io.k8s.api.batch.v1beta1.CronJobStatus.dhall sha256:74d9ee0419f4a414496b1195a1fa782696a07d131edf8194fa2d3dae5253a70b , JobTemplateSpec = ./defaults/io.k8s.api.batch.v2alpha1.JobTemplateSpec.dhall sha256:2064710fdd9153299b2090c2c3a3c828153d5b94c346da0c252ebad5f18bf9d6 , CertificateSigningRequest = diff --git a/dhall-kubernetes-generator/src/Dhall/Kubernetes/Data.hs b/dhall-kubernetes-generator/src/Dhall/Kubernetes/Data.hs index 4be652f1..890a852f 100644 --- a/dhall-kubernetes-generator/src/Dhall/Kubernetes/Data.hs +++ b/dhall-kubernetes-generator/src/Dhall/Kubernetes/Data.hs @@ -42,10 +42,10 @@ excludedModels = Set.fromList $ ModelName <$> , "io.k8s.api.apps.v1beta2.ControllerRevision" , "io.k8s.api.apps.v1beta1.ControllerRevisionList" , "io.k8s.api.apps.v1beta2.ControllerRevisionList" - , "io.k8s.api.batch.v1beta1.CronJob" - , "io.k8s.api.batch.v1beta1.CronJobList" - , "io.k8s.api.batch.v1beta1.CronJobSpec" - , "io.k8s.api.batch.v1beta1.CronJobStatus" + , "io.k8s.api.batch.v2alpha1.CronJob" + , "io.k8s.api.batch.v2alpha1.CronJobList" + , "io.k8s.api.batch.v2alpha1.CronJobSpec" + , "io.k8s.api.batch.v2alpha1.CronJobStatus" , "io.k8s.api.autoscaling.v1.CrossVersionObjectReference" , "io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference" , "io.k8s.api.apps.v1beta2.DaemonSet" diff --git a/examples/deployment.dhall b/examples/deployment.dhall index 923e8353..a993aa37 100644 --- a/examples/deployment.dhall +++ b/examples/deployment.dhall @@ -2,7 +2,7 @@ let types = ../types.dhall sha256:e48e21b807dad217a6c3e631fcaf3e950062310bfb4a8bbcecc330eb7b2f60ed let defaults = - ../defaults.dhall sha256:4450e23dc81975d111650e06c0238862944bf699537af6cbacac9c7e471dfabe + ../defaults.dhall sha256:98bf62170e7785da6f627a06980c5788a5b8bdd0d1e61bb7c141beef18a3129c let kv = ( ../Prelude.dhall).JSON.keyText diff --git a/examples/deploymentSimple.dhall b/examples/deploymentSimple.dhall index 9b03ff3d..3e3d0fe8 100644 --- a/examples/deploymentSimple.dhall +++ b/examples/deploymentSimple.dhall @@ -2,7 +2,7 @@ let types = ../types.dhall sha256:e48e21b807dad217a6c3e631fcaf3e950062310bfb4a8bbcecc330eb7b2f60ed let defaults = - ../defaults.dhall sha256:4450e23dc81975d111650e06c0238862944bf699537af6cbacac9c7e471dfabe + ../defaults.dhall sha256:98bf62170e7785da6f627a06980c5788a5b8bdd0d1e61bb7c141beef18a3129c let deployment : types.Deployment diff --git a/examples/ingress.dhall b/examples/ingress.dhall index 9fef65c0..f400740c 100644 --- a/examples/ingress.dhall +++ b/examples/ingress.dhall @@ -8,7 +8,7 @@ let types = ../types.dhall sha256:e48e21b807dad217a6c3e631fcaf3e950062310bfb4a8bbcecc330eb7b2f60ed let defaults = - ../defaults.dhall sha256:4450e23dc81975d111650e06c0238862944bf699537af6cbacac9c7e471dfabe + ../defaults.dhall sha256:98bf62170e7785da6f627a06980c5788a5b8bdd0d1e61bb7c141beef18a3129c let Service = { name : Text, host : Text, version : Text } diff --git a/examples/service.dhall b/examples/service.dhall index 3df22779..15188c57 100644 --- a/examples/service.dhall +++ b/examples/service.dhall @@ -2,7 +2,7 @@ let types = ../types.dhall sha256:e48e21b807dad217a6c3e631fcaf3e950062310bfb4a8bbcecc330eb7b2f60ed let defaults = - ../defaults.dhall sha256:4450e23dc81975d111650e06c0238862944bf699537af6cbacac9c7e471dfabe + ../defaults.dhall sha256:98bf62170e7785da6f627a06980c5788a5b8bdd0d1e61bb7c141beef18a3129c let kv = (../Prelude.dhall).JSON.keyText diff --git a/types.dhall b/types.dhall index de7043b0..00edc249 100644 --- a/types.dhall +++ b/types.dhall @@ -171,13 +171,13 @@ , JobStatus = ./types/io.k8s.api.batch.v1.JobStatus.dhall sha256:f9ea74adce4426e2277120d8427b62ca553e6a57274469139665a59801f8e1cd , CronJob = - ./types/io.k8s.api.batch.v2alpha1.CronJob.dhall sha256:840986a1e70a00f6e2e2f23b07a37512d898c58d74e26d30fc7323b410c8e361 + ./types/io.k8s.api.batch.v1beta1.CronJob.dhall sha256:840986a1e70a00f6e2e2f23b07a37512d898c58d74e26d30fc7323b410c8e361 , CronJobList = - ./types/io.k8s.api.batch.v2alpha1.CronJobList.dhall sha256:976540580d18de17232ed4e476a9187252b76f53d1ac42490ae3c7e0298a29c6 + ./types/io.k8s.api.batch.v1beta1.CronJobList.dhall sha256:976540580d18de17232ed4e476a9187252b76f53d1ac42490ae3c7e0298a29c6 , CronJobSpec = - ./types/io.k8s.api.batch.v2alpha1.CronJobSpec.dhall sha256:e89fa481f32a37dcbf1d9fee7d6889dfa22f864cb73d9f3c24eb95a50c7076b3 + ./types/io.k8s.api.batch.v1beta1.CronJobSpec.dhall sha256:e89fa481f32a37dcbf1d9fee7d6889dfa22f864cb73d9f3c24eb95a50c7076b3 , CronJobStatus = - ./types/io.k8s.api.batch.v2alpha1.CronJobStatus.dhall sha256:bde64bf966a728236e65593d21075a7f13c954793b7676d628b53594c2619b92 + ./types/io.k8s.api.batch.v1beta1.CronJobStatus.dhall sha256:bde64bf966a728236e65593d21075a7f13c954793b7676d628b53594c2619b92 , JobTemplateSpec = ./types/io.k8s.api.batch.v2alpha1.JobTemplateSpec.dhall sha256:163664a9da1702255493569597194ecc983bf46b3e775ee6de29c01da10bfe62 , CertificateSigningRequest =