mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
fix: Open the mutated resources file in append mode to allow additions to it (#11619)
Signed-off-by: ammar <ammar.yasser@vodafone.com> Co-authored-by: ammar <ammar.yasser@vodafone.com>
This commit is contained in:
parent
d61f87e0f9
commit
07d758265a
1 changed files with 1 additions and 1 deletions
|
@ -381,7 +381,7 @@ func (p *PolicyProcessor) printMutatedOutput(yaml string) error {
|
||||||
}
|
}
|
||||||
file = f
|
file = f
|
||||||
} else {
|
} else {
|
||||||
f, err := os.OpenFile(filepath.Join(mutateLogPath, filename+".yaml"), os.O_CREATE|os.O_WRONLY, 0o600) // #nosec G304
|
f, err := os.OpenFile(filepath.Join(mutateLogPath, filename+".yaml"), os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0o600) // #nosec G304
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue