From 8f767e38f34612f78eef5762e98d7df5589a02c7 Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Tue, 13 Feb 2024 17:12:57 -0500 Subject: [PATCH] Modernize patch syntax in kustomizations The `patchesStrategicMerge` keyword has been deprecated in Kustomize for quite some time, and generates warnings with recent versions of Kustomize: Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically. This commit replaces all instances of: patchesStrategicMerge: - somepatch.yaml With: patches: - path: somepatch.yaml --- manifests/kustomize/components/monitoring/kustomization.yaml | 4 ++-- manifests/kustomize/components/rbac-full/kustomization.yaml | 4 ++-- manifests/kustomize/components/resources/kustomization.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/kustomize/components/monitoring/kustomization.yaml b/manifests/kustomize/components/monitoring/kustomization.yaml index 495ed310e..84035542d 100644 --- a/manifests/kustomize/components/monitoring/kustomization.yaml +++ b/manifests/kustomize/components/monitoring/kustomization.yaml @@ -5,8 +5,8 @@ resources: - service.yaml - servicemonitor.yaml -patchesStrategicMerge: - - deployment.yaml +patches: + - path: deployment.yaml configurations: - kustomizeconfig.yaml diff --git a/manifests/kustomize/components/rbac-full/kustomization.yaml b/manifests/kustomize/components/rbac-full/kustomization.yaml index 288b34240..e5cb48fca 100644 --- a/manifests/kustomize/components/rbac-full/kustomization.yaml +++ b/manifests/kustomize/components/rbac-full/kustomization.yaml @@ -8,5 +8,5 @@ resources: - clusterrolebinding.yaml - serviceaccount.yaml -patchesStrategicMerge: - - deployment.yaml +patches: + - path: deployment.yaml diff --git a/manifests/kustomize/components/resources/kustomization.yaml b/manifests/kustomize/components/resources/kustomization.yaml index 1cec77a14..7b60268eb 100644 --- a/manifests/kustomize/components/resources/kustomization.yaml +++ b/manifests/kustomize/components/resources/kustomization.yaml @@ -1,5 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1alpha1 kind: Component -patchesStrategicMerge: - - deployment.yaml +patches: + - path: deployment.yaml