@@ -175,8 +175,8 @@ func (m *manifestPatcher) ApplyPatches() ([]map[string]interface{}, error) {
175175 }
176176
177177 kustomizationYAMLFile := map [string ][]interface {}{
178- "resources" : {},
179- "patchesStrategicMerge" : {},
178+ "resources" : {},
179+ "patches" : {},
180180 }
181181
182182 options := []struct {
@@ -185,7 +185,7 @@ func (m *manifestPatcher) ApplyPatches() ([]map[string]interface{}, error) {
185185 objects []map [string ]interface {}
186186 }{
187187 {"manifest" , "resources" , m .manifests },
188- {"patch" , "patchesStrategicMerge " , m .patches },
188+ {"patch" , "patches " , m .patches },
189189 }
190190 for _ , option := range options {
191191 for i , object := range option .objects {
@@ -205,9 +205,15 @@ func (m *manifestPatcher) ApplyPatches() ([]map[string]interface{}, error) {
205205 return nil , fmt .Errorf (errTemplate , option .optionType , err )
206206 }
207207
208- kustomizationYAMLFile [option .kustomizeKey ] = append (
209- kustomizationYAMLFile [option .kustomizeKey ], manifestFileName ,
210- )
208+ if option .kustomizeKey != "patches" {
209+ kustomizationYAMLFile [option .kustomizeKey ] = append (
210+ kustomizationYAMLFile [option .kustomizeKey ], manifestFileName ,
211+ )
212+ } else {
213+ kustomizationYAMLFile [option .kustomizeKey ] = append (
214+ kustomizationYAMLFile [option .kustomizeKey ], map [string ]interface {}{"path" : manifestFileName },
215+ )
216+ }
211217 }
212218 }
213219
0 commit comments