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 }