From 195d14d0d2eb6ca7490f087517ae04092f54fe7c Mon Sep 17 00:00:00 2001 From: Pete Savage Date: Mon, 30 Jan 2023 18:01:58 +0000 Subject: [PATCH] Added top level security protocol --- pkg/api/v1/schema.json | 4 ++++ pkg/api/v1/types.go | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/api/v1/schema.json b/pkg/api/v1/schema.json index 74fc58f..a65b617 100644 --- a/pkg/api/v1/schema.json +++ b/pkg/api/v1/schema.json @@ -199,6 +199,7 @@ "type": "string" }, "securityProtocol": { + "description": "Deprecated: Use the top level securityProtocol field instead", "type": "string" }, "saslMechanism": { @@ -227,6 +228,9 @@ }, "sasl": { "$ref": "#/definitions/KafkaSASLConfig" + }, + "securityProtocol": { + "type": "string" } }, "required": [ diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index faaf02f..13ebc8d 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -416,6 +416,9 @@ type BrokerConfig struct { // Sasl corresponds to the JSON schema field "sasl". Sasl *KafkaSASLConfig `json:"sasl,omitempty"` + + // SecurityProtocol corresponds to the JSON schema field "securityProtocol". + SecurityProtocol *string `json:"securityProtocol,omitempty"` } // UnmarshalJSON implements json.Unmarshaler. @@ -563,7 +566,7 @@ type KafkaSASLConfig struct { // SaslMechanism corresponds to the JSON schema field "saslMechanism". SaslMechanism *string `json:"saslMechanism,omitempty"` - // SecurityProtocol corresponds to the JSON schema field "securityProtocol". + // Deprecated: Use the top level securityProtocol field instead SecurityProtocol *string `json:"securityProtocol,omitempty"` // Username corresponds to the JSON schema field "username".