mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-14 10:30:59 +00:00
Update patch factory and add multi transformer with checking conflicts
This commit is contained in:
@@ -117,6 +117,16 @@ func (m ResMap) ErrorIfNotEqual(m2 ResMap) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopy clone the resmap into a new one
|
||||
func (m ResMap) DeepCopy() ResMap {
|
||||
mcopy := make(ResMap)
|
||||
for id, obj := range m {
|
||||
mcopy[id] = resource.NewResourceFromUnstruct(obj.Unstructured)
|
||||
mcopy[id].SetBehavior(obj.Behavior())
|
||||
}
|
||||
return mcopy
|
||||
}
|
||||
|
||||
func (m ResMap) insert(newName string, obj *unstructured.Unstructured) error {
|
||||
oldName := obj.GetName()
|
||||
gvk := obj.GroupVersionKind()
|
||||
|
||||
Reference in New Issue
Block a user