This PR addresses a bug where Replication Factors are attempted to be updated by a user. This is not supported functionality in Kafka, so the user needs to be thrown a meaningful error message. A new function UpdateReplicationFactor handles throwing the error to the user.
Fixes #23
I have:
[ x] Read and followed Crossplane's [contribution process].
[x ] Run make reviewable test to ensure this PR is ready for review.
How has this code been tested
Tested manually by applying a config with 1 replication factor and attempting to change it to three:
2022-01-19T13:51:41.617-0500 DEBUG controller-runtime.manager.events Warning {"object": {"kind":"Topic","name":"sample-topic","uid":"2887e9c0-6e4c-4bff-843f-196bd688edbb","apiVersion":"topic.kafka.crossplane.io/v1alpha1","resourceVersion":"886110"}, "reason": "CannotUpdateExternalResource", "message": "updating replication factor is not supported"}
Description of your changes
This PR addresses a bug where Replication Factors are attempted to be updated by a user. This is not supported functionality in Kafka, so the user needs to be thrown a meaningful error message. A new function UpdateReplicationFactor handles throwing the error to the user.
Fixes #23
I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
Tested manually by applying a config with 1 replication factor and attempting to change it to three:
2022-01-19T13:51:41.617-0500 DEBUG controller-runtime.manager.events Warning {"object": {"kind":"Topic","name":"sample-topic","uid":"2887e9c0-6e4c-4bff-843f-196bd688edbb","apiVersion":"topic.kafka.crossplane.io/v1alpha1","resourceVersion":"886110"}, "reason": "CannotUpdateExternalResource", "message": "updating replication factor is not supported"}