Skip to content

Commit

Permalink
chore(fix): syslog-ng persist file argument fix
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Wilcsinszky <[email protected]>
  • Loading branch information
pepov committed Apr 12, 2023
1 parent e0331c4 commit c8363c8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/resources/syslogng/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ func (r *Reconciler) statefulset() (runtime.Object, reconciler.DesiredState, err
syslogngContainer := kubetool.FindContainerByName(desired.Spec.Template.Spec.Containers, containerName)
if mnt := kubetool.FindVolumeMountByName(syslogngContainer.VolumeMounts, buffersVolumeName); mnt != nil {
if !sliceAny(syslogngContainer.Args, func(arg string) bool { return strings.Contains(arg, "--persist-file") }) {
persistFilePath := filepath.Join(mnt.MountPath, "/syslog-ng.persist")
persistFileFlag := fmt.Sprintf("--persist-file=%q", persistFilePath)
syslogngContainer.Args = append(syslogngContainer.Args, persistFileFlag)
syslogngContainer.Args = append(syslogngContainer.Args,
"--persist-file", filepath.Join(mnt.MountPath, "/syslog-ng.persist"))
}
}

Expand Down

0 comments on commit c8363c8

Please sign in to comment.