Skip to content

Commit 47ee611

Browse files
authored
Add KAFKA_DISCOVERY operation group (#3139)
1 parent 8b1e6ee commit 47ee611

File tree

9 files changed

+11
-14
lines changed

9 files changed

+11
-14
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,4 @@ require (
282282
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
283283
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
284284
sigs.k8s.io/yaml v1.3.0 // indirect
285-
)
285+
)

go.sum

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ github.com/compose-spec/compose-go/v2 v2.1.3 h1:bD67uqLuL/XgkAK6ir3xZvNLFPxPScEi
188188
github.com/compose-spec/compose-go/v2 v2.1.3/go.mod h1:lFN0DrMxIncJGYAXTfWuajfwj5haBJqrBkarHcnjJKc=
189189
github.com/confluentinc/ccloud-sdk-go-v1-public v0.0.0-20250521223017-0e8f6f971b52 h1:19qEGhkbZa5fopKCe0VPIV+Sasby4Pv10z9ZaktwWso=
190190
github.com/confluentinc/ccloud-sdk-go-v1-public v0.0.0-20250521223017-0e8f6f971b52/go.mod h1:62EMf+5uFEt1BJ2q8WMrUoI9VUSxAbDnmZCGRt/MbA0=
191-
github.com/confluentinc/ccloud-sdk-go-v2-internal/connect-custom-plugin v0.0.9 h1:YgiAPGIR1xVk+KcnAymH5/Mppln25HPtabV+FDFVRPc=
192-
github.com/confluentinc/ccloud-sdk-go-v2-internal/connect-custom-plugin v0.0.9/go.mod h1:JF4KDwy/DpyTe3GXaceY8TFRR2Kj8J3+PF5hWdP+iak=
193191
github.com/confluentinc/ccloud-sdk-go-v2/ai v0.1.0 h1:zSF4OQUJXWH2JeAo9rsq13ibk+JFdzITGR8S7cFMpzw=
194192
github.com/confluentinc/ccloud-sdk-go-v2/ai v0.1.0/go.mod h1:DoxqzzF3JzvJr3fWkvCiOHFlE0GoYpozWxFZ1Ud9ntA=
195193
github.com/confluentinc/ccloud-sdk-go-v2/apikeys v0.4.0 h1:8fWyLwMuy8ec0MVF5Avd54UvbIxhDFhZzanHBVwgxdw=
@@ -214,8 +212,6 @@ github.com/confluentinc/ccloud-sdk-go-v2/cmk v0.25.0 h1:EdZzQZ4SI5q+f0DQPjH3lWpy
214212
github.com/confluentinc/ccloud-sdk-go-v2/cmk v0.25.0/go.mod h1:FSSO9mkNPJKMa7Ky66IlXEG7o5H6cpyuKKClvRf9y+0=
215213
github.com/confluentinc/ccloud-sdk-go-v2/connect v0.7.0 h1:ISrVOX9qJ2Sxiu/fGBqqHeaA0SRJQujc8yP7qAZRL3Y=
216214
github.com/confluentinc/ccloud-sdk-go-v2/connect v0.7.0/go.mod h1:zHG/3DzsnoHC81B1AY9K/8bMX3mxbIp5/nHHdypa//w=
217-
github.com/confluentinc/ccloud-sdk-go-v2/connect-custom-plugin v0.0.6 h1:DYQyS4lnYVtuTMVoF+g/ogWcgCiTbsKxhQv0c5KLRJc=
218-
github.com/confluentinc/ccloud-sdk-go-v2/connect-custom-plugin v0.0.6/go.mod h1:odu6w/vnVrZo00N4yHq5buzWOme1vT1WqksQ3y69sQU=
219215
github.com/confluentinc/ccloud-sdk-go-v2/connect-custom-plugin v0.0.9 h1:o1zKZlKbnN9uv+Y8TxwesBRryUl3lEU6lnfndEJigxQ=
220216
github.com/confluentinc/ccloud-sdk-go-v2/connect-custom-plugin v0.0.9/go.mod h1:TtTcSfm+/JvnfqEKglOZ32LIcsRbdtrQdI+TtcP7fiU=
221217
github.com/confluentinc/ccloud-sdk-go-v2/flink v0.9.0 h1:QqtIFEB5E3CIyGMJd7NQBEtc/k3K11PX7f4Fj7sPFdo=

internal/iam/command_ipfilter_create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func (c *ipFilterCommand) newCreateCommand(cfg *config.Config) *cobra.Command {
3737
cmd.Flags().String("environment", "", "Identifier of the environment for which this filter applies. Without this flag, applies only to the organization.")
3838
opGroups := []string{"MANAGEMENT", "SCHEMA", "FLINK"}
3939
if isKafkaEnabled {
40-
opGroups = append(opGroups, "KAFKA_MANAGEMENT", "KAFKA_DATA")
40+
opGroups = append(opGroups, "KAFKA_MANAGEMENT", "KAFKA_DATA", "KAFKA_DISCOVERY")
4141
}
4242
cmd.Flags().StringSlice("operations", nil, fmt.Sprintf("A comma-separated list of operation groups: %s.", utils.ArrayToCommaDelimitedString(opGroups, "or")))
4343
cmd.Flags().Bool("no-public-networks", false, "Use in place of ip-groups to reference the no public networks IP Group.")

internal/iam/command_ipfilter_update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (c *ipFilterCommand) newUpdateCommand(cfg *config.Config) *cobra.Command {
2828
isKafkaEnabled := cfg.IsTest || (cfg.Context() != nil && featureflags.Manager.BoolVariation("auth.ip_filter.kafka.cli.enabled", cfg.Context(), featureflags.GetCcloudLaunchDarklyClient(cfg.Context().PlatformName), true, false))
2929
operationGroups := []string{"SCHEMA", "FLINK"}
3030
if isKafkaEnabled {
31-
operationGroups = append(operationGroups, "KAFKA_MANAGEMENT", "KAFKA_DATA")
31+
operationGroups = append(operationGroups, "KAFKA_MANAGEMENT", "KAFKA_DATA", "KAFKA_DISCOVERY")
3232
}
3333
cmd.Example = examples.BuildExampleString(
3434
examples.Example{

test/fixtures/output/iam/ip-filter/create-help.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Flags:
1212
--resource-group string Name of resource group: "management" or "multiple". (default "multiple")
1313
--ip-groups strings A comma-separated list of IP group IDs.
1414
--environment string Identifier of the environment for which this filter applies. Without this flag, applies only to the organization.
15-
--operations strings A comma-separated list of operation groups: "MANAGEMENT", "SCHEMA", "FLINK", "KAFKA_MANAGEMENT", or "KAFKA_DATA".
15+
--operations strings A comma-separated list of operation groups: "MANAGEMENT", "SCHEMA", "FLINK", "KAFKA_MANAGEMENT", "KAFKA_DATA", or "KAFKA_DISCOVERY".
1616
--no-public-networks Use in place of ip-groups to reference the no public networks IP Group.
1717
--context string CLI context name.
1818
-o, --output string Specify the output format as "human", "json", or "yaml". (default "human")

test/fixtures/output/iam/ip-filter/update-add-kafka-operation-group.golden

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
| Name | demo-ip-filter |
44
| Resource Group | multiple |
55
| IP Groups | ipg-12345, ipg-abcde |
6-
| Operation Groups | KAFKA_DATA, KAFKA_MANAGEMENT, |
7-
| | MANAGEMENT, SCHEMA |
6+
| Operation Groups | KAFKA_DATA, KAFKA_DISCOVERY, |
7+
| | KAFKA_MANAGEMENT, MANAGEMENT, |
8+
| | SCHEMA |
89
| Resource Scope | crn://confluent.cloud/organization=org123 |
910
+------------------+-------------------------------------------+

test/fixtures/output/iam/ip-filter/update-help.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Usage:
66
Examples:
77
Update the name and add an IP group and operation group to IP filter "ipf-abcde":
88

9-
$ confluent iam ip-filter update ipf-abcde --name "New Filter Name" --add-ip-groups ipg-12345 --add-operation-groups SCHEMA,FLINK,KAFKA_MANAGEMENT,KAFKA_DATA
9+
$ confluent iam ip-filter update ipf-abcde --name "New Filter Name" --add-ip-groups ipg-12345 --add-operation-groups SCHEMA,FLINK,KAFKA_MANAGEMENT,KAFKA_DATA,KAFKA_DISCOVERY
1010

1111
Flags:
1212
--name string Updated name of the IP filter.

test/iam_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,8 @@ func (s *CLITestSuite) TestIamIpFilter() {
420420
{args: "iam ip-filter update ipf-34dq4 --remove-operation-groups SCHEMA", fixture: "iam/ip-filter/update-remove-operation-group.golden"},
421421
{args: "iam ip-filter update ipf-34dq4 --resource-group multiple --add-operation-groups FLINK", fixture: "iam/ip-filter/update-add-flink-operation-group.golden"},
422422
{args: "iam ip-filter update ipf-34dq6 --remove-operation-groups SCHEMA,FLINK", fixture: "iam/ip-filter/update-remove-sr-and-flink-operation-group.golden"},
423-
{args: "iam ip-filter update ipf-34dq4 --resource-group multiple --add-operation-groups KAFKA_MANAGEMENT,KAFKA_DATA", fixture: "iam/ip-filter/update-add-kafka-operation-group.golden"},
424-
{args: "iam ip-filter update ipf-34dq7 --remove-operation-groups KAFKA_MANAGEMENT,KAFKA_DATA", fixture: "iam/ip-filter/update-remove-kafka-operation-group.golden"},
423+
{args: "iam ip-filter update ipf-34dq4 --resource-group multiple --add-operation-groups KAFKA_MANAGEMENT,KAFKA_DATA,KAFKA_DISCOVERY", fixture: "iam/ip-filter/update-add-kafka-operation-group.golden"},
424+
{args: "iam ip-filter update ipf-34dq7 --remove-operation-groups KAFKA_MANAGEMENT,KAFKA_DATA,KAFKA_DISCOVERY", fixture: "iam/ip-filter/update-remove-kafka-operation-group.golden"},
425425
}
426426

427427
for _, test := range tests {

test/test-server/iam_handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ func handleIamIpFilter(t *testing.T) http.HandlerFunc {
679679
} else if filterId == "ipf-34dq6" {
680680
operationGroups = []string{"MANAGEMENT", "SCHEMA", "FLINK"}
681681
} else if filterId == "ipf-34dq7" {
682-
operationGroups = []string{"KAFKA_MANAGEMENT", "KAFKA_DATA"}
682+
operationGroups = []string{"KAFKA_MANAGEMENT", "KAFKA_DATA", "KAFKA_DISCOVERY"}
683683
} else {
684684
operationGroups = []string{"MANAGEMENT"}
685685
}

0 commit comments

Comments
 (0)