When adding a kustomize patch to a kustomization.yaml
the double quotes are replaced with single quotes that lead to error
I am using the following:
kustomize edit add patch --patch "- op: add\n path: /metadata/annotations/argocd.argoproj.io~1sync-wave\n. value: 1" --kind Deployment
is converted to
- patch: '- op: add\n path: /metadata/annotations/argocd.argoproj.io~1sync-wave\n value: 1'
target:
kind: Deployment
in the kustomization.yaml
This leads to the following error when you do kustomize build
Error: trouble configuring builtin PatchTransformer with config: `
patch: ‘- op: add\n path: /metadata/annotations/argocd.argoproj.io~1sync-wave\n value:
1’
target:
kind: Deployment
`: unable to parse SM or JSON patch from [- op: add\n path: /metadata/annotations/argocd.argoproj.io~1sync-wave\n value: 1]
How do I make sure that the patch in kustomization.yaml
has double quotes instead?