mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-09-15 12:18:57 +00:00
fix(kustomize): call json6902 only when needed
Call json6902 transformer only when there are patches to apply. Addresses #5956
This commit is contained in:
@@ -89,7 +89,10 @@ func (p *PatchTransformerPlugin) Transform(m resmap.ResMap) error {
|
|||||||
if p.smPatches != nil {
|
if p.smPatches != nil {
|
||||||
return p.transformStrategicMerge(m)
|
return p.transformStrategicMerge(m)
|
||||||
}
|
}
|
||||||
return p.transformJson6902(m)
|
if p.jsonPatches != nil {
|
||||||
|
return p.transformJson6902(m)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// transformStrategicMerge applies each loaded strategic merge patch
|
// transformStrategicMerge applies each loaded strategic merge patch
|
||||||
|
|||||||
@@ -94,7 +94,10 @@ func (p *plugin) Transform(m resmap.ResMap) error {
|
|||||||
if p.smPatches != nil {
|
if p.smPatches != nil {
|
||||||
return p.transformStrategicMerge(m)
|
return p.transformStrategicMerge(m)
|
||||||
}
|
}
|
||||||
return p.transformJson6902(m)
|
if p.jsonPatches != nil {
|
||||||
|
return p.transformJson6902(m)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// transformStrategicMerge applies each loaded strategic merge patch
|
// transformStrategicMerge applies each loaded strategic merge patch
|
||||||
|
|||||||
Reference in New Issue
Block a user