From 0421c7f0089c418ac62f722f340f0724b1476390 Mon Sep 17 00:00:00 2001 From: SpiritZhou Date: Thu, 19 Oct 2023 00:17:40 +0800 Subject: [PATCH] chore: Update deprecated patchesJson6902 to patches in yaml (#5092) Signed-off-by: anton.lysina --- config/crd/kustomization.yaml | 31 +++++++++++++++---------------- config/e2e/kustomization.yaml | 16 +++++++++------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 00fe9589021..7d99e07af67 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -9,22 +9,8 @@ resources: # +kubebuilder:scaffold:crdkustomizeresource ## ScaledJob CRD needs to be patched because for some usecases (details in the patch file) -patchesJson6902: -- target: - version: v1 - group: apiextensions.k8s.io - kind: CustomResourceDefinition - name: scaledjobs.keda.sh - path: patches/scaledjob_patch.yaml -- target: - version: v1 - group: apiextensions.k8s.io - kind: CustomResourceDefinition - name: scaledobjects.keda.sh - path: patches/scaledobject_patch.yaml -patchesStrategicMerge: # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. # patches here are for enabling the conversion webhook for each CRD #- patches/webhook_in_scaledobjects.yaml @@ -38,5 +24,18 @@ patchesStrategicMerge: # +kubebuilder:scaffold:crdkustomizecainjectionpatch # the following config is for teaching kustomize how to do kustomization for CRDs. -configurations: -#- kustomizeconfig.yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +patches: +- path: patches/scaledjob_patch.yaml + target: + group: apiextensions.k8s.io + kind: CustomResourceDefinition + name: scaledjobs.keda.sh + version: v1 +- path: patches/scaledobject_patch.yaml + target: + group: apiextensions.k8s.io + kind: CustomResourceDefinition + name: scaledobjects.keda.sh + version: v1 diff --git a/config/e2e/kustomization.yaml b/config/e2e/kustomization.yaml index ddc889a3bec..8ed4cd78173 100644 --- a/config/e2e/kustomization.yaml +++ b/config/e2e/kustomization.yaml @@ -1,10 +1,3 @@ -patchesJson6902: -- target: - group: apps - version: v1 - kind: Deployment - name: keda-operator - path: patch_operator.yml resources: - ../general @@ -13,3 +6,12 @@ resources: - ../metrics-server - ../service_account - ../webhooks +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +patches: +- path: patch_operator.yml + target: + group: apps + kind: Deployment + name: keda-operator + version: v1