Add compatibility with GCP Schema Registries #1153
Open
+103
−23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes did you make? (Give an overview)
Added new cluster property "gcpSchemaRegistry" to enable compatibility with new GCP Schema Registries.
This property can be used in config.yaml file like this:
Or can be enabled with the env variable:
KAFKA_CLUSTERS_0_GCPSCHAMAREGISTRY=true
Important changes in code are:
gcpSchemaRegistry
config property in kafbat-ui-apiSchemaRegistryService
It's needed to use
gcloud auth application-default login
to get the credentials to connect to GCP SchemaRegistries or run kafka-ui in a compute engine instance or GKE with a service account with the needed permissions.
Note: This functionality only works now with Avro schema types as these are the ones I work with.
It could work with Protobuf schemas, but not with JSON ones as GCP Schema Registries don't
support them.
How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)
Manually (please, describe, if necessary)
Changes tested connecting to GCP and Confluent Schema Registries to check:
It was impossible to pass unit tests even before adding any change :'(
Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)
Check out Contributing and Code of Conduct