So we are using kustomize to patch a yaml file and with kubectl version 1.20.0 it works fine . the moment we use with kubectl 1.21 it gives the error
command executed
kubectl kustomize > test.yaml
Error: no matches for IdId ~G_v1_ServiceAccount|reloader|reloader-reloader; failed to find unique target for patch ~G_v1_ServiceAccount|reloader-reloader
here is are all the files
resource.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
annotations:
meta.helm.sh/release-namespace: "default"
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
chart: "reloader-v0.0.77"
release: "reloader"
heritage: "Tiller"
app.kubernetes.io/managed-by: "Tiller"
name: reloader-reloader
---
patch.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
annotations:
meta.helm.sh/release-namespace: "default"
meta.helm.sh/release-name: "reloader"
labels:
app: reloader-reloader
release: "reloader"
heritage: "Tiller"
app.kubernetes.io/managed-by: "Tiller"
name: reloader-reloader
namespace: reloader
---
here is the kustomization file
kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: reloader
resources:
- resource.yaml
patchesStrategicMerge:
- patches.yaml
Any help here please