// Package merger merges a partial desired object into a live Kubernetes
// custom resource according to that resource's CRD schema.
//
// The package exists because one patch strategy cannot safely express every
// field in a Kubernetes object. Server-Side Apply follows structural schema
// ownership exactly, so applying one key of an atomic map replaces the whole
// map. JSON merge patch preserves map keys, but replaces arrays and would drop
// unrelated entries from list-map fields such as containers and env.
//
// Merger resolves the target CRD and reproduces its merge markers locally:
// granular maps merge by field, list maps merge by their configured keys, sets
// retain distinct values, and atomic values replace. Callers may override a
// path when the application's partial-update contract intentionally differs
// from the CRD ownership contract. The resulting complete live object can then
// be submitted once with an optimistic-lock merge patch, preserving unrelated
// fields without relying on Server-Side Apply ownership.
package merger
