Skip to content

Commit

Permalink
fix: zero out manifest contents before setting new value
Browse files Browse the repository at this point in the history
This might lead to manifests being appended forever on changes.

Fixes #3476

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
(cherry picked from commit f0970ea)
  • Loading branch information
smira committed Apr 15, 2021
1 parent c1ce1b8 commit cb82fb5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/resources/k8s/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ func (r *Manifest) ResourceDefinition() meta.ResourceDefinitionSpec {

// SetYAML parses manifest from YAML.
func (r *Manifest) SetYAML(yamlBytes []byte) error {
r.spec.Items = nil
reader := yaml.NewYAMLReader(bufio.NewReader(bytes.NewReader(yamlBytes)))

for {
Expand Down

0 comments on commit cb82fb5

Please sign in to comment.