mirror of
https://github.com/siderolabs/talos.git
synced 2025-10-28 15:01:13 +01:00
fix: zero out manifest contents before setting new value
This might lead to manifests being appended forever on changes. Fixes #3476 Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
This commit is contained in:
parent
8b8542e3b5
commit
f0970ea7ff
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user