Skip to content

Commit

Permalink
Merge pull request kube-logging#1664 from kube-logging/release-4.5
Browse files Browse the repository at this point in the history
Merge latest updates from release 4.5 back to master
  • Loading branch information
pepov authored Feb 7, 2024
2 parents 133eff3 + b2f6253 commit 3738d7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/resources/fluentbit/configsecret.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ func (r *Reconciler) configSecret() (runtime.Object, reconciler.DesiredState, er
for _, a := range r.loggingRoutes {
tenants = append(tenants, a.Status.Tenants...)
}
if err := r.configureOutputsForTenants(ctx, tenants, &input, r.fluentdSpec, r.syslogNGSpec); err != nil {
if err := r.configureOutputsForTenants(ctx, tenants, &input); err != nil {
return nil, nil, errors.WrapIf(err, "configuring outputs for target tenants")
}
} else {
Expand Down
6 changes: 3 additions & 3 deletions pkg/resources/fluentbit/tenants.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func FindTenants(ctx context.Context, target metav1.LabelSelector, reader client
return tenants, nil
}

func (r *Reconciler) configureOutputsForTenants(ctx context.Context, tenants []v1beta1.Tenant, input *fluentBitConfig, fluentdSpec *v1beta1.FluentdSpec, syslogNGSpec *v1beta1.SyslogNGSpec) error {
func (r *Reconciler) configureOutputsForTenants(ctx context.Context, tenants []v1beta1.Tenant, input *fluentBitConfig) error {
var errs error
for _, t := range tenants {
allNamespaces := len(t.Namespaces) == 0
Expand All @@ -89,7 +89,7 @@ func (r *Reconciler) configureOutputsForTenants(ctx context.Context, tenants []v
if err := r.resourceReconciler.Client.Get(ctx, types.NamespacedName{Name: t.Name}, logging); err != nil {
return errors.WrapIf(err, "getting logging resource")
}
if fluentdSpec != nil {
if logging.Spec.FluentdSpec != nil {
if input.FluentForwardOutput == nil {
input.FluentForwardOutput = &fluentForwardOutputConfig{}
}
Expand All @@ -99,7 +99,7 @@ func (r *Reconciler) configureOutputsForTenants(ctx context.Context, tenants []v
Host: aggregatorEndpoint(logging, fluentd.ServiceName),
Port: fluentd.ServicePort,
})
} else if syslogNGSpec != nil {
} else if logging.Spec.SyslogNGSpec != nil {
if input.SyslogNGOutput == nil {
input.SyslogNGOutput = newSyslogNGOutputConfig()
}
Expand Down

0 comments on commit 3738d7b

Please sign in to comment.