Skip to content

Commit

Permalink
Merge pull request #802 from redpanda-data/filter-out-redpanda-intern…
Browse files Browse the repository at this point in the history
…al-topics-for-mirrormaker2

Filter out Redpanda internal topics for MirrorMaker 2 connector
  • Loading branch information
tomasz-sadura authored Aug 8, 2023
2 parents fa077ed + cf8a1d2 commit dd77c0e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions backend/pkg/connector/interceptor/mirror_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ func KafkaConnectToConsoleMirrorSourceHook(response model.ValidationResponse, _
Definition: model.ConfigDefinitionKey{
Name: "topics.exclude",
Type: "LIST",
DefaultValue: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.cloud.sla_verification,_internal_connectors.*,_schemas",
DefaultValue: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.*,_internal_connectors.*,_schemas",
Importance: "MEDIUM",
Required: false,
DisplayName: "Topics exclude",
Documentation: "Excluded topics. Supports comma-separated topic names and regexes",
},
Value: model.ConfigDefinitionValue{
Name: "topics.exclude",
Value: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.cloud.sla_verification,_internal_connectors.*,_schemas",
Value: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.*,_internal_connectors.*,_schemas",
RecommendedValues: []string{},
Visible: true,
Errors: []string{},
Expand Down
12 changes: 6 additions & 6 deletions backend/pkg/connector/interceptor/mirror_hook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,15 @@ func TestKafkaConnectToConsoleMirrorSourceHook(t *testing.T) {
Definition: model.ConfigDefinitionKey{
Name: "topics.exclude",
Type: "LIST",
DefaultValue: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.cloud.sla_verification,_internal_connectors.*,_schemas",
DefaultValue: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.*,_internal_connectors.*,_schemas",
Importance: "MEDIUM",
Required: false,
DisplayName: "Topics exclude",
Documentation: "Excluded topics. Supports comma-separated topic names and regexes",
},
Value: model.ConfigDefinitionValue{
Name: "topics.exclude",
Value: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.cloud.sla_verification,_internal_connectors.*,_schemas",
Value: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.*,_internal_connectors.*,_schemas",
RecommendedValues: []string{},
Visible: true,
Errors: []string{},
Expand Down Expand Up @@ -609,15 +609,15 @@ func TestKafkaConnectToConsoleMirrorSourceHook(t *testing.T) {
Definition: model.ConfigDefinitionKey{
Name: "topics.exclude",
Type: "LIST",
DefaultValue: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.cloud.sla_verification,_internal_connectors.*,_schemas",
DefaultValue: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.*,_internal_connectors.*,_schemas",
Importance: "MEDIUM",
Required: false,
DisplayName: "Topics exclude",
Documentation: "Excluded topics. Supports comma-separated topic names and regexes",
},
Value: model.ConfigDefinitionValue{
Name: "topics.exclude",
Value: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.cloud.sla_verification,_internal_connectors.*,_schemas",
Value: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.*,_internal_connectors.*,_schemas",
RecommendedValues: []string{},
Visible: true,
Errors: []string{},
Expand Down Expand Up @@ -922,15 +922,15 @@ func TestKafkaConnectToConsoleMirrorSourceHook(t *testing.T) {
Definition: model.ConfigDefinitionKey{
Name: "topics.exclude",
Type: "LIST",
DefaultValue: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.cloud.sla_verification,_internal_connectors.*,_schemas",
DefaultValue: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.*,_internal_connectors.*,_schemas",
Importance: "MEDIUM",
Required: false,
DisplayName: "Topics exclude",
Documentation: "Excluded topics. Supports comma-separated topic names and regexes",
},
Value: model.ConfigDefinitionValue{
Name: "topics.exclude",
Value: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.cloud.sla_verification,_internal_connectors.*,_schemas",
Value: ".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.*,_internal_connectors.*,_schemas",
RecommendedValues: []string{},
Visible: true,
Errors: []string{},
Expand Down
2 changes: 1 addition & 1 deletion backend/pkg/connector/patch/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (*ConfigPatchMirrorSource) PatchDefinition(d model.ConfigDefinition, connec
d.SetDocumentation("Replication factor for newly created remote topics. Set -1 for cluster default").
SetDefaultValue("-1")
case "topics.exclude":
d.SetDefaultValue(".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.cloud.sla_verification,_internal_connectors.*,_schemas")
d.SetDefaultValue(".*[\\-\\.]internal,.*\\.replica,__consumer_offsets,_redpanda_e2e_probe,__redpanda.*,_internal_connectors.*,_schemas")
case "sync.group.offsets.enabled":
d.SetDefaultValue("true")
case name:
Expand Down

0 comments on commit dd77c0e

Please sign in to comment.