Skip to content

Commit

Permalink
fix skip consumer
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineJac committed Sep 9, 2024
1 parent 0dbb4f8 commit b5b73ab
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions pkg/dump/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,30 @@ func getProxyConfiguration(ctx context.Context, group *errgroup.Group,
if err != nil {
return fmt.Errorf("plugins: %w", err)
}

if config.LookUpSelectorTagsConsumerGroups != nil {
globalConsumerGroupsPlugins, err := GetAllPlugins(ctx, client, config.LookUpSelectorTagsConsumerGroups)
if err != nil {
return fmt.Errorf("error retrieving global plugins: %w", err)
}
// if globalServices are not present, add them.

for _, globalConsumerGroupsPlugin := range globalConsumerGroupsPlugins {
found := false
for _, plugin := range plugins {
if *globalConsumerGroupsPlugin.ID == *plugin.ID {
found = true
break
}
}
if !found {
plugins = append(plugins, globalConsumerGroupsPlugin)
}
}
}

plugins = excludeKonnectManagedPlugins(plugins)

if config.SkipConsumers {
plugins = excludeConsumersPlugins(plugins)
plugins = excludeConsumerGroupsPlugins(plugins)
Expand Down

0 comments on commit b5b73ab

Please sign in to comment.