Skip to content

Commit

Permalink
Merge pull request #109 from Kissy/main
Browse files Browse the repository at this point in the history
Add generic patches in Kustomization
  • Loading branch information
stefanprodan committed Jun 11, 2021
2 parents 56c4834 + a1b524d commit b1176f6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
14 changes: 14 additions & 0 deletions apis/kustomize/kustomize_types.go
Expand Up @@ -86,6 +86,20 @@ type Selector struct {
LabelSelector string `json:"labelSelector,omitempty"`
}

// Patch contains either a StrategicMerge or a JSON6902 patch, either a file or inline,
// and the target the patch should be applied to.
type Patch struct {
// Patch contains the JSON6902 patch document with an array of
// operation objects.
// +required
Patch string `json:"patch,omitempty"`

// Target points to the resources that the patch document should
// be applied to.
// +optional
Target Selector `json:"target,omitempty"`
}

// JSON6902 is a JSON6902 operation object.
// https://tools.ietf.org/html/rfc6902#section-4
type JSON6902 struct {
Expand Down
16 changes: 16 additions & 0 deletions apis/kustomize/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b1176f6

Please sign in to comment.