mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-14 10:30:59 +00:00
add omitempty tag to replacement sources and targets
This commit is contained in:
@@ -16,10 +16,10 @@ const DefaultReplacementFieldPath = "metadata.name"
|
|||||||
// where it is from and where it is to.
|
// where it is from and where it is to.
|
||||||
type Replacement struct {
|
type Replacement struct {
|
||||||
// The source of the value.
|
// The source of the value.
|
||||||
Source *SourceSelector `json:"source" yaml:"source"`
|
Source *SourceSelector `json:"source,omitempty" yaml:"source,omitempty"`
|
||||||
|
|
||||||
// The N fields to write the value to.
|
// The N fields to write the value to.
|
||||||
Targets []*TargetSelector `json:"targets" yaml:"targets"`
|
Targets []*TargetSelector `json:"targets,omitempty" yaml:"targets,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SourceSelector is the source of the replacement transformer.
|
// SourceSelector is the source of the replacement transformer.
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ resources:
|
|||||||
# There could be secrets in Base, if just using a fork/rebase workflow
|
# There could be secrets in Base, if just using a fork/rebase workflow
|
||||||
replacements:
|
replacements:
|
||||||
- path: replacement.yaml
|
- path: replacement.yaml
|
||||||
source: null
|
|
||||||
targets: null
|
|
||||||
`)
|
`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user