From c8363c87aaacc2a495fea1f2e2cdb0803b63f84c Mon Sep 17 00:00:00 2001 From: Peter Wilcsinszky Date: Wed, 12 Apr 2023 11:29:58 +0200 Subject: [PATCH] chore(fix): syslog-ng persist file argument fix Signed-off-by: Peter Wilcsinszky --- pkg/resources/syslogng/statefulset.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/resources/syslogng/statefulset.go b/pkg/resources/syslogng/statefulset.go index e4c7a95bc..fd0321f17 100644 --- a/pkg/resources/syslogng/statefulset.go +++ b/pkg/resources/syslogng/statefulset.go @@ -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")) } }