mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
add edit-fix for patchesStrategicMerge to patches
This commit is contained in:
@@ -222,6 +222,13 @@ func (k *Kustomization) FixKustomizationPreMarshalling() error {
|
||||
k.Patches = append(k.Patches, k.PatchesJson6902...)
|
||||
k.PatchesJson6902 = nil
|
||||
|
||||
if k.PatchesStrategicMerge != nil {
|
||||
for _, patchStrategicMerge := range k.PatchesStrategicMerge {
|
||||
k.Patches = append(k.Patches, Patch{Patch: string(patchStrategicMerge)})
|
||||
}
|
||||
k.PatchesStrategicMerge = nil
|
||||
}
|
||||
|
||||
// this fix is not in FixKustomizationPostUnmarshalling because
|
||||
// it will break some commands like `create` and `add`. those
|
||||
// commands depend on 'commonLabels' field
|
||||
|
||||
Reference in New Issue
Block a user