From e8e2f21281da16f35435b7ebb5a4435bcdf0bfdd Mon Sep 17 00:00:00 2001 From: Peter Gvizd Date: Wed, 20 Jul 2022 09:35:14 +0200 Subject: [PATCH] Applied suggestions --- pkg/resources/fluentd/appconfigmap.go | 4 +--- pkg/resources/fluentd/statefulset.go | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/resources/fluentd/appconfigmap.go b/pkg/resources/fluentd/appconfigmap.go index 015767993..7d8876601 100644 --- a/pkg/resources/fluentd/appconfigmap.go +++ b/pkg/resources/fluentd/appconfigmap.go @@ -214,9 +214,7 @@ func (r *Reconciler) newCheckPod(hashKey string) *corev1.Pod { "--dry-run", } - if len(r.Logging.Spec.FluentdSpec.ExtraArgs) != 0 { - containerArgs = append(containerArgs, r.Logging.Spec.FluentdSpec.ExtraArgs...) - } + containerArgs = append(containerArgs, r.Logging.Spec.FluentdSpec.ExtraArgs...) pod := &corev1.Pod{ ObjectMeta: r.FluentdObjectMeta(fmt.Sprintf("fluentd-configcheck-%s", hashKey), ComponentConfigCheck), diff --git a/pkg/resources/fluentd/statefulset.go b/pkg/resources/fluentd/statefulset.go index 851b7d921..48b664cf5 100644 --- a/pkg/resources/fluentd/statefulset.go +++ b/pkg/resources/fluentd/statefulset.go @@ -149,9 +149,7 @@ func fluentContainer(spec *v1beta1.FluentdSpec) corev1.Container { } } - if len(spec.ExtraArgs) != 0 { - container.Args = append(container.Args, spec.ExtraArgs...) - } + container.Args = append(container.Args, spec.ExtraArgs...) return container }