add omitempty tag to replacement sources and targets

This commit is contained in:
natasha41575
2021-11-08 12:33:30 -08:00
parent 46b3cd2109
commit d8f406d06f
2 changed files with 2 additions and 4 deletions

View File

@@ -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.

View File

@@ -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
`)
}