Define RabbitMQ config at parent resource
Before one couldn't set config for the MQ at the parent resource, as it wasn't able to set and handovered to the AMQP CR.
Now the CRs for all deployments using MQ have also the config section and the config is forwarded to the AMQP CR.
We define the MQ section at the amqp crd and everywhere we use the MQ (via snippet.) Now we can have one place where we define the common parts and don't need to change two places.
Everything that is defined for the MQ crd already else where but is needed in the snipped to set it e.g. via openstack deployment, needs to be defined at messagequeuesnip. Else there are descriptions defined twice what cuelang don't like.
Diff at MQ CR (only due to using common MQ snipped):
$ diff gen-cue-amqp-server-crd.cue.yaml.old yaook/helm_builder/Charts/crds/templates/gen-cue-amqp-server-crd.cue.yaml
35a36
> description: Configure the RabbitMQ instance.
70a72
> description: RabbitMQ exporter config.
135c137,141
< description: Resource limits for containers spawned by the AMQPServer
---
> description: It is recommended to set these resource limits to bypass
> problems with cgroup limits for RabbitMQ. The infra operator will
> use these values to configure RabbitMQ resource limits separately
> by setting the fields total_memory_available_override_value and
> default_worker_pool_size inside /etc/rabbitmq/rabbitmq.conf .
138c144,145
< description: Define resource requests/limits for the container
---
> description: Define resource requests/limits for the RabbitMQ
> container
166c173,174
< description: Define resource requests/limits for the container
---
> description: Define resource requests/limits for the rabbitmq-exporter
> containerDiff at parent CR, example nova:
$ diff gen-cue-nova-crd.cue.yaml.old yaook/helm_builder/Charts/crds/templates/gen-cue-nova-crd.cue.yaml
2813a2814
> default: true
2815c2816
< metric
---
> metrics
2827a2829,2832
> type: object
> rabbitmqConfig:
> additionalProperties:
> x-kubernetes-int-or-string: trueEdited by Stefan Hoffmann