From 38b3e9b84a368cd552ab82047aa70b428a26997f Mon Sep 17 00:00:00 2001 From: Zbynek Roubalik <726523+zroubalik@users.noreply.github.com> Date: Thu, 1 Oct 2020 15:24:19 +0200 Subject: [PATCH] modify ScaledJob CRD patch for version v1 (#1208) Signed-off-by: Zbynek Roubalik --- config/crd/kustomization.yaml | 4 +++- config/crd/patches/scaledjob_patch.yaml | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index f8af9fca593..862e83deef0 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -7,9 +7,11 @@ resources: - bases/keda.sh_triggerauthentications.yaml # +kubebuilder:scaffold:crdkustomizeresource +## ScaledJob CRD needs to be patched because of an issue with required properties +## https://github.com/kedacore/keda/issues/927 patchesJson6902: - target: - version: v1beta1 + version: v1 group: apiextensions.k8s.io kind: CustomResourceDefinition name: scaledjobs.keda.sh diff --git a/config/crd/patches/scaledjob_patch.yaml b/config/crd/patches/scaledjob_patch.yaml index a6e9c41b4a2..d4ea90e8421 100644 --- a/config/crd/patches/scaledjob_patch.yaml +++ b/config/crd/patches/scaledjob_patch.yaml @@ -1,12 +1,12 @@ --- - op: add - path: /spec/validation/openAPIV3Schema/properties/spec/properties/jobTargetRef/properties/template/properties/spec/properties/containers/items/properties/ports/items/required/- + path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/jobTargetRef/properties/template/properties/spec/properties/containers/items/properties/ports/items/required/- value: protocol - op: add - path: /spec/validation/openAPIV3Schema/properties/spec/properties/jobTargetRef/properties/template/properties/spec/properties/ephemeralContainers/items/properties/ports/items/required/- + path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/jobTargetRef/properties/template/properties/spec/properties/ephemeralContainers/items/properties/ports/items/required/- value: protocol - op: add - path: /spec/validation/openAPIV3Schema/properties/spec/properties/jobTargetRef/properties/template/properties/spec/properties/initContainers/items/properties/ports/items/required/- + path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/jobTargetRef/properties/template/properties/spec/properties/initContainers/items/properties/ports/items/required/- value: protocol