mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +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.
|
||||
type Replacement struct {
|
||||
// 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.
|
||||
Targets []*TargetSelector `json:"targets" yaml:"targets"`
|
||||
Targets []*TargetSelector `json:"targets,omitempty" yaml:"targets,omitempty"`
|
||||
}
|
||||
|
||||
// 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
|
||||
replacements:
|
||||
- path: replacement.yaml
|
||||
source: null
|
||||
targets: null
|
||||
`)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user