I'm trying to share JSON patches between overlays. I could do something like:
bases:
- ../bases
patchesJson6902:
- target:
...
But I'd have to copy the full target for each overlay. I'd prefer to describe the target and patch in one place, then pull that into the overlays that need it.
I therefore tried using this approach where your kustomization.yaml
has a transformers
directive, pointing at a file explicitly triggering the plugin.
From the docs it looks like this should work in my overlay's kustomization.yaml
:
bases:
- ../bases
transformers:
- ../transformers/example
but when I run kubectl apply -k
I get:
Error: json: unknown field "transformers"
Can anyone point me at what I'm doing wrong? Is there a better way to do this?