nrvnrvn / k8dis

Redis Operator for Kubernetes
Apache License 2.0
5 stars 0 forks source link

any plans to change : current implementation is limited to reconfiguring one Redis replication at a time #2

Open nrvnrvn opened 2 years ago

nrvnrvn commented 2 years ago

From https://github.com/amaizfinance/redis-operator/issues/13

The readme states

One Redis Operator deployment is designed to rule multiple Redis replication setups. However you should bear in mind that current implementation is limited to reconfiguring one Redis replication at a time

First of all to clarify what this means. Am I correct in saying that I cant create two

apiVersion: k8s.amaiz.com/v1alpha1
kind: Redis
...

custom resources and have the operator manage them both ?

Are there plans to remove this limitation ?

nrvnrvn commented 2 years ago

original comment:

This limitation means that you can have two kind: Redis resources configured and deployed but if you change something to both of them at the same time then the operator will reconfigure them one after another, but not concurrently or in parallel.

So, technically it means that when the Redis controller is added to the manager by default it allows only one reconciliation to run at a time. And if for instance, you need to manage 100 Redis'es using a single controller then the reconciliation requests may queue up depending on how long it takes time to run a single cycle. In this case you definitely would want to run multiple reconciliation cycles concurrently.

But again, it does not mean you are bound to only one Redis per Redis operator. The fact that there is no concurrency in managing multiple Redis'es is just something to bear in mind.

I've added it to the v1 roadmap to make it configurable.

See: https://github.com/amaizfinance/redis-operator/blob/0e3b84bdf4fec86da1cafee39fa6ffe1d2bcd11f/pkg/controller/redis/redis_controller.go#L70

https://github.com/amaizfinance/redis-operator/blob/0e3b84bdf4fec86da1cafee39fa6ffe1d2bcd11f/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controller.go#L70-L72