<p>Hi I am following this doc <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/devel/api-conventions.md#strategic-merge-patch" rel="noreferrer">https://github.com/kubernetes/kubernetes/blob/master/docs/devel/api-conventions.md#strategic-merge-patch</a> for strategic-merge-patch to partially update the JSON objects using PATCH REST API. The document says that it can add or delete the object, but I have tried, whenever I add new object to existing JSON it just replaces that instead of adding new. I am trying this to modify pod definition in OpenShift 3.2.  can anyone please help me how it works, probably with example. I need to use delete operation also , where I can delete the value by name.</p>

<p>As documented it depends on annotations of the types. AFAIS the strategic merge only works if <code>patchStrategy</code> and <code>patchMergeKey</code> are given. For example, this is the case in <a href="https://github.com/kubernetes/client-go/blob/7ac1236/pkg/api/v1/types.go#L2119" rel="nofollow noreferrer"><code>pod.spec.containers</code></a> and <a href="https://github.com/kubernetes/client-go/blob/7ac1236/pkg/api/v1/types.go#L2098" rel="nofollow noreferrer"><code>pod.spec.volumes</code></a>.</p>

<p>For an example you need to provide more information about the type you want to merge.</p>
