-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94a4cbf
commit 81bb903
Showing
3 changed files
with
200 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
package interceptor | ||
|
||
import ( | ||
"github.com/redpanda-data/console/backend/pkg/connector/model" | ||
) | ||
|
||
// KafkaConnectToConsoleIcebergSinkHook adds Iceberg sink specific config options | ||
// missing in Validate Kafka Connect response | ||
func KafkaConnectToConsoleIcebergSinkHook(response model.ValidationResponse, config map[string]any) model.ValidationResponse { | ||
response.Configs = append(response.Configs, model.ConfigDefinition{ | ||
Definition: model.ConfigDefinitionKey{ | ||
Name: "iceberg.catalog.type", | ||
Type: "STRING", | ||
DefaultValue: "rest", | ||
Importance: model.ConfigDefinitionImportanceMedium, | ||
Required: false, | ||
DisplayName: "Iceberg catalog type", | ||
Documentation: "The Iceberg catalog type", | ||
Dependents: []string{}, | ||
}, | ||
Value: model.ConfigDefinitionValue{ | ||
Name: "iceberg.catalog.type", | ||
Value: "rest", | ||
RecommendedValues: []string{}, | ||
Visible: true, | ||
Errors: []string{}, | ||
}, | ||
Metadata: model.ConfigDefinitionMetadata{ | ||
ComponentType: model.ComponentRadioGroup, | ||
RecommendedValues: []model.RecommendedValueWithMetadata{ | ||
{Value: "rest", DisplayName: "REST"}, | ||
{Value: "hive", DisplayName: "HIVE"}, | ||
{Value: "hadoop", DisplayName: "HADOOP"}, | ||
}, | ||
}, | ||
}, | ||
model.ConfigDefinition{ | ||
Definition: model.ConfigDefinitionKey{ | ||
Name: "iceberg.catalog.uri", | ||
Type: "STRING", | ||
DefaultValue: "", | ||
Importance: model.ConfigDefinitionImportanceHigh, | ||
Required: true, | ||
DisplayName: "Iceberg catalog uri", | ||
Documentation: "Iceberg catalog uri", | ||
Dependents: []string{}, | ||
}, | ||
Value: model.ConfigDefinitionValue{ | ||
Name: "iceberg.catalog.uri", | ||
Value: "", | ||
RecommendedValues: []string{}, | ||
Visible: true, | ||
Errors: []string{}, | ||
}, | ||
}, | ||
model.ConfigDefinition{ | ||
Definition: model.ConfigDefinitionKey{ | ||
Name: "iceberg.catalog.s3.secret-access-key", | ||
Type: "STRING", | ||
DefaultValue: "", | ||
Importance: model.ConfigDefinitionImportanceHigh, | ||
Required: true, | ||
DisplayName: "iceberg.catalog.s3.secret-access-key", | ||
Documentation: "iceberg.catalog.s3.secret-access-key", | ||
Dependents: []string{}, | ||
}, | ||
Value: model.ConfigDefinitionValue{ | ||
Name: "iceberg.catalog.s3.secret-access-key", | ||
Value: "", | ||
RecommendedValues: []string{}, | ||
Visible: true, | ||
Errors: []string{}, | ||
}, | ||
}, | ||
|
||
model.ConfigDefinition{ | ||
Definition: model.ConfigDefinitionKey{ | ||
Name: "iceberg.catalog.s3.access-key-id", | ||
Type: "STRING", | ||
DefaultValue: "", | ||
Importance: model.ConfigDefinitionImportanceHigh, | ||
Required: true, | ||
DisplayName: "iceberg.catalog.s3.access-key-id", | ||
Documentation: "iceberg.catalog.s3.access-key-id", | ||
Dependents: []string{}, | ||
}, | ||
Value: model.ConfigDefinitionValue{ | ||
Name: "iceberg.catalog.s3.access-key-id", | ||
Value: "", | ||
RecommendedValues: []string{}, | ||
Visible: true, | ||
Errors: []string{}, | ||
}, | ||
}, | ||
|
||
model.ConfigDefinition{ | ||
Definition: model.ConfigDefinitionKey{ | ||
Name: "iceberg.catalog.s3.endpoint", | ||
Type: "STRING", | ||
DefaultValue: "", | ||
Importance: model.ConfigDefinitionImportanceHigh, | ||
Required: true, | ||
DisplayName: "iceberg.catalog.s3.endpoint", | ||
Documentation: "iceberg.catalog.s3.endpoint", | ||
Dependents: []string{}, | ||
}, | ||
Value: model.ConfigDefinitionValue{ | ||
Name: "iceberg.catalog.s3.endpoint", | ||
Value: "", | ||
RecommendedValues: []string{}, | ||
Visible: true, | ||
Errors: []string{}, | ||
}, | ||
}, | ||
model.ConfigDefinition{ | ||
Definition: model.ConfigDefinitionKey{ | ||
Name: "iceberg.catalog.s3.path-style-access", | ||
Type: "STRING", | ||
DefaultValue: "", | ||
Importance: model.ConfigDefinitionImportanceHigh, | ||
Required: true, | ||
DisplayName: "iceberg.catalog.s3.path-style-access", | ||
Documentation: "iceberg.catalog.s3.path-style-access", | ||
Dependents: []string{}, | ||
}, | ||
Value: model.ConfigDefinitionValue{ | ||
Name: "iceberg.catalog.s3.path-style-access", | ||
Value: "", | ||
RecommendedValues: []string{}, | ||
Visible: true, | ||
Errors: []string{}, | ||
}, | ||
}, | ||
model.ConfigDefinition{ | ||
Definition: model.ConfigDefinitionKey{ | ||
Name: "iceberg.catalog.client.region", | ||
Type: "STRING", | ||
DefaultValue: "", | ||
Importance: model.ConfigDefinitionImportanceHigh, | ||
Required: true, | ||
DisplayName: "iceberg.catalog.client.region", | ||
Documentation: "iceberg.catalog.client.region", | ||
Dependents: []string{}, | ||
}, | ||
Value: model.ConfigDefinitionValue{ | ||
Name: "iceberg.catalog.client.region", | ||
Value: "", | ||
RecommendedValues: []string{}, | ||
Visible: true, | ||
Errors: []string{}, | ||
}, | ||
}, | ||
model.ConfigDefinition{ | ||
Definition: model.ConfigDefinitionKey{ | ||
Name: "iceberg.catalog.credential", | ||
Type: "STRING", | ||
DefaultValue: "", | ||
Importance: model.ConfigDefinitionImportanceHigh, | ||
Required: true, | ||
DisplayName: "Iceberg catalog credential", | ||
Documentation: "Iceberg catalog credential", | ||
Dependents: []string{}, | ||
}, | ||
Value: model.ConfigDefinitionValue{ | ||
Name: "iceberg.catalog.credential", | ||
Value: "", | ||
RecommendedValues: []string{}, | ||
Visible: true, | ||
Errors: []string{}, | ||
}, | ||
}, | ||
model.ConfigDefinition{ | ||
Definition: model.ConfigDefinitionKey{ | ||
Name: "iceberg.catalog.warehouse", | ||
Type: "STRING", | ||
DefaultValue: "", | ||
Importance: model.ConfigDefinitionImportanceHigh, | ||
Required: true, | ||
DisplayName: "Iceberg catalog warehouse", | ||
Documentation: "Iceberg catalog warehouse", | ||
Dependents: []string{}, | ||
}, | ||
Value: model.ConfigDefinitionValue{ | ||
Name: "iceberg.catalog.warehouse", | ||
Value: "", | ||
RecommendedValues: []string{}, | ||
Visible: true, | ||
Errors: []string{}, | ||
}, | ||
}, | ||
) | ||
|
||
return KafkaConnectToConsoleJSONSchemaHook(response, config) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters