Skip to content

v0.16.1

Choose a tag to compare

@rafaelcalleja rafaelcalleja released this 04 Oct 10:58
f5b8d57
https://github.com/kubernetes-sigs/kustomize/issues/2705

The patchJson6902 directive (an older keyword) accepts a list of

target (Gvk, Namespace, Name)
It must match exactly one resource. No wildcards.
path (to a file containing the patch) or patch (a patch directly included in the kustomization file).
The patch must parse as a JSON6902 patch.
The target must match exactly one resources.
rendered doc: https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/patchesjson6902/
source: https://github.com/kubernetes-sigs/kustomize/blob/master/site/content/en/api-reference/kustomization/patchesjson6902/_index.md

The patches directive is newer and accepts a list of

target (Gvk, Namespace, Name, AnnotationSelector, LabelSelector)
Namespace and Name can be regex.
It can match more than one resource; all will be patched using the given patch.
Path (to a file containing the patch) or Patch (a patch directly included in the kustomization file).
If the patch doesn't parse correctly as a JSON6902 patch, it's attempted as a Strategic Merge Patch.
rendered doc: https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/patches/
source: https://github.com/kubernetes-sigs/kustomize/blob/master/site/content/en/api-reference/kustomization/patches/_index.md