Skip to content

Commit

Permalink
Addressing additional comments
Browse files Browse the repository at this point in the history
Signed-off-by: David Elie-Dit-Cosaque <[email protected]>
  • Loading branch information
edcdavid authored and openshift-merge-bot[bot] committed Jun 5, 2024
1 parent a0a8b1e commit 26c984b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
5 changes: 0 additions & 5 deletions examples/policyGenerator-kustomize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,3 @@ policies:
- name: myapp
manifests:
- path: input-kustomize/
patches:
- metadata:
name: "myname"
openapi:
path: schema.json
11 changes: 4 additions & 7 deletions internal/patches.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ import (
)

type kustomizeFile struct {
OpenAPI types.Filepath `json:"openapi,omitempty" yaml:"openapi,omitempty"`
Patches []Patch `json:"patches" yaml:"patches"`
Resources []string `json:"resources" yaml:"resources"`
OpenAPI types.Filepath `json:"openapi,omitempty" yaml:"openapi,omitempty"`
Patches []types.Filepath `json:"patches" yaml:"patches"`
Resources []string `json:"resources" yaml:"resources"`
}

type Patch struct {
Path string `yaml:"path,omitempty" json:"path,omitempty"`
}
type manifestPatcher struct {
// The manifests to patch.
manifests []map[string]interface{}
Expand Down Expand Up @@ -226,7 +223,7 @@ func (m *manifestPatcher) ApplyPatches() ([]map[string]interface{}, error) {
kustomizationYAMLFile.Resources = append(kustomizationYAMLFile.Resources, manifestFileName)
} else {
kustomizationYAMLFile.Patches = append(kustomizationYAMLFile.Patches,
Patch{Path: manifestFileName})
types.Filepath{Path: manifestFileName})
}
}
}
Expand Down

0 comments on commit 26c984b

Please sign in to comment.