Correct shovel properties type and expose more shovel configurations in CRD #620
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.
This closes #614
Note to reviewers: remember to look at the commits in this PR and consider if they can be squashed
Note to contributors: remember to re-generate client set if there are any API changes
Summary Of Changes
destApplicationProperties
,destProperties
anddestPublishProperties
should be map instead of string. See related rabbit-hole changes:For Shovel changed dest-publish-properties to map michaelklishin/rabbit-hole#262
Add two more (and correct others) Shovel properties michaelklishin/rabbit-hole#268
expose
dest-message-annotations
andsrc-consumer-args
in shovel CRD.Reasons not to expose
src-queue-args
anddest-queue-args
for now <- created queues from with shovel won't be deleted when shovel is removed. I'm unsure if we want to encourage such use case. Most importantly queue creation is already possible withqueues.rabbitmq.com
. We could expose them if we get specific user request in the future.add shovel validation
Accepted protocols for source and destination are
amqp10
andamqp091
. If empty the plugin defaults toamqp091: https://github.com/rabbitmq/rabbitmq-server/blob/f83ed85fedadc3dc29595d0b0d109db0b8c67f17/deps/rabbitmq_shovel/src/rabbit_shovel_parameters.erl#L489-L500
When any protocol is set to
amqp10
, address needs to be provided.plugin validation on destination: https://github.com/rabbitmq/rabbitmq-server/blob/f83ed85fedadc3dc29595d0b0d109db0b8c67f17/deps/rabbitmq_shovel/src/rabbit_shovel_parameters.erl#L153
plugin validation on source: https://github.com/rabbitmq/rabbitmq-server/blob/main/deps/rabbitmq_shovel/src/rabbit_shovel_parameters.erl#L123
add a shovel system that uses
amqp10
protocol for source and destination. Configurations are different foramqp10
andamqp091
. By default, shovel plugin assumesamqp10
protocol. Previous system test only testamqp091
related properties.Conversion webhook and why we don't need it
This PR changes Shovel CRD and it's a breaking change. However, I don't believe a conversion web hook is necessary because if you were to set any of these three properties currently, reconciliation fails.
Example
shovels.rabbitmq.com
manifest:Reconciliation fails with rabbit-hole validation error status code
400
returned from RMQ server, e.g.So there can't be an existng
shovels.rabbitmq.com
with these fields set therefore there is nothing for us to convert from.