Skip to content

Commit

Permalink
fix: add namespace filter when listing aggregator configs (#1644)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Wilcsinszky <[email protected]>
  • Loading branch information
pepov committed Jan 19, 2024
1 parent 68f0e88 commit a925fc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/resources/model/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ func (r LoggingResourceRepository) handleMultipleDetachedFluentdObjects(list []v

func (r LoggingResourceRepository) FluentdConfigFor(ctx context.Context, logging v1beta1.Logging) (*v1beta1.FluentdConfig, []v1beta1.FluentdConfig, error) {
var list v1beta1.FluentdConfigList
if err := r.Client.List(ctx, &list); err != nil {
if err := r.Client.List(ctx, &list, client.InNamespace(logging.Spec.ControlNamespace)); err != nil {
return nil, []v1beta1.FluentdConfig{}, err
}

Expand Down Expand Up @@ -401,7 +401,7 @@ func (r LoggingResourceRepository) handleMultipleDetachedSyslogNGObjects(list []

func (r LoggingResourceRepository) SyslogNGConfigFor(ctx context.Context, logging v1beta1.Logging) (*v1beta1.SyslogNGConfig, []v1beta1.SyslogNGConfig, error) {
var list v1beta1.SyslogNGConfigList
if err := r.Client.List(ctx, &list); err != nil {
if err := r.Client.List(ctx, &list, client.InNamespace(logging.Spec.ControlNamespace)); err != nil {
return nil, []v1beta1.SyslogNGConfig{}, err
}

Expand Down

0 comments on commit a925fc6

Please sign in to comment.