Skip to content

Commit

Permalink
chore: Update deprecated patchesJson6902 to patches in yaml (#5092)
Browse files Browse the repository at this point in the history
  • Loading branch information
SpiritZhou authored Oct 18, 2023
1 parent 3d00a09 commit 308cec4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
31 changes: 15 additions & 16 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
16 changes: 9 additions & 7 deletions config/e2e/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
patchesJson6902:
- target:
group: apps
version: v1
kind: Deployment
name: keda-operator
path: patch_operator.yml

resources:
- ../general
Expand All @@ -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

0 comments on commit 308cec4

Please sign in to comment.