# A strategic merge patch adds one item to a list in a custom resource, but the build replaces the whole list. Why?

Kustomize, Hard (Expert), Troubleshooting. https://k8wiz.com/uquiz/a-strategic-merge-patch-adds-one-item-to-a-list-in-a-custom-resource-but-the-build-replaces-the-whole-list-why

- A. Custom resources don't support patches of any kind
- B. Kustomize has no merge key for that list, so strategic merge replaces it
- C. The patch needs a $patch: append directive on the list
- D. Lists in custom resources are always sorted and rewritten by the API server

**Answer:** Kustomize has no merge key for that list, so strategic merge replaces it

**Explanation:** Strategic merge relies on schema information such as merge keys, which Kustomize's built-in schema only has for Kubernetes types. For a custom resource, a list in the patch replaces the original. Use a JSON 6902 patch, or provide the CRD's schema through the openapi field.
