diff --git a/pkg/sdk/logging/api/v1beta1/logging_types.go b/pkg/sdk/logging/api/v1beta1/logging_types.go index dc8ab0b42e..03c0f1a6c9 100644 --- a/pkg/sdk/logging/api/v1beta1/logging_types.go +++ b/pkg/sdk/logging/api/v1beta1/logging_types.go @@ -302,7 +302,12 @@ func (l *Logging) SetDefaults() error { } if l.Spec.FluentdSpec.FluentOutLogrotate == nil { l.Spec.FluentdSpec.FluentOutLogrotate = &FluentOutLogrotate{ - Enabled: true, + Enabled: false, + } + } + if !l.Spec.FluentdSpec.FluentOutLogrotate.Enabled { + if _, ok := l.Spec.FluentdSpec.Annotations["fluentbit.io/exclude"]; !ok { + l.Spec.FluentdSpec.Annotations["fluentbit.io/exclude"] = "true" } } if l.Spec.FluentdSpec.FluentOutLogrotate.Path == "" {