Skip to content

Commit 26c984b

Browse files
edcdavidopenshift-merge-bot[bot]
authored andcommitted
Addressing additional comments
Signed-off-by: David Elie-Dit-Cosaque <[email protected]>
1 parent a0a8b1e commit 26c984b

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

examples/policyGenerator-kustomize.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,3 @@ policies:
1313
- name: myapp
1414
manifests:
1515
- path: input-kustomize/
16-
patches:
17-
- metadata:
18-
name: "myname"
19-
openapi:
20-
path: schema.json

internal/patches.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,11 @@ import (
1717
)
1818

1919
type kustomizeFile struct {
20-
OpenAPI types.Filepath `json:"openapi,omitempty" yaml:"openapi,omitempty"`
21-
Patches []Patch `json:"patches" yaml:"patches"`
22-
Resources []string `json:"resources" yaml:"resources"`
20+
OpenAPI types.Filepath `json:"openapi,omitempty" yaml:"openapi,omitempty"`
21+
Patches []types.Filepath `json:"patches" yaml:"patches"`
22+
Resources []string `json:"resources" yaml:"resources"`
2323
}
2424

25-
type Patch struct {
26-
Path string `yaml:"path,omitempty" json:"path,omitempty"`
27-
}
2825
type manifestPatcher struct {
2926
// The manifests to patch.
3027
manifests []map[string]interface{}
@@ -226,7 +223,7 @@ func (m *manifestPatcher) ApplyPatches() ([]map[string]interface{}, error) {
226223
kustomizationYAMLFile.Resources = append(kustomizationYAMLFile.Resources, manifestFileName)
227224
} else {
228225
kustomizationYAMLFile.Patches = append(kustomizationYAMLFile.Patches,
229-
Patch{Path: manifestFileName})
226+
types.Filepath{Path: manifestFileName})
230227
}
231228
}
232229
}

0 commit comments

Comments
 (0)