You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... you will notice, that Kustomize/patchesStrategicMerge is not merging but replacing the original tree in the bee.yml:
For the k8s-deployment patch, all works like expected 👍
Can you give us a hint, how we can get this to work in the same way for a non-k8s resource?
Thank you,
Arno
The text was updated successfully, but these errors were encountered:
patchesStrategicMerge treats the patch as a strategic merge patch when corresponding resource is native in Kubernetes. If a kind is not found, such as a custom resource, the patch is treated as json merge patch. The JSON patch will replace the whole tree as @johnhny observed. To keep the volumes under spec, you also need to add them in the patch.
Here is some background related to this. Strategic merge patch doesn't work for custom resources since the metadata needed by this kind of patch is missing in the custom resources. kubernetes/kubernetes#53558
Hi everybody 👋
I'm curious how to use Kustomize patchesStrategicMerge to patch non-kubernetes resources.
I created a tiny example project, to demonstrate the issue:
https://github.com/johnhny/kustomize-patch-non-k8s
When you run and compare these two configurations like:
... you will notice, that Kustomize/patchesStrategicMerge is not merging but replacing the original tree in the bee.yml:
For the k8s-deployment patch, all works like expected 👍
Can you give us a hint, how we can get this to work in the same way for a non-k8s resource?
Thank you,
Arno
The text was updated successfully, but these errors were encountered: