spotahome / redis-operator

Redis Operator creates/configures/manages high availability redis with sentinel automatic failover atop Kubernetes.
Apache License 2.0
1.49k stars 356 forks source link

Filter watched namespaces #617

Closed hashemi-soroush closed 10 months ago

hashemi-soroush commented 1 year ago

Filter watched namespaces

In many scenarios, the operator is required to watch only a subset of namespaces. For example, when we want to ensure that Redis instances are created only in namespaces that start with "redis". Or when we want to have multiple instances of this operator, each with a different configuration, watching over a subset of our Redis instances. In these scenarios, we need to be able to configure the operator to watch only a subset of namespaces.

Proposed design

I suggest the name Supported Namespaces for this feature.

We add a new CLI argument to the operator, named supported-namespace-regex, defaulted to .*.

For filtering according to the namespace, using Admission Webhooks prevents multiple operators, each watching a different subset of namespaces. We need each operator to do the filtering for itself. So, we need to change the Retriever.

github-actions[bot] commented 11 months ago

This issue is stale because it has been open for 45 days with no activity.

hashemi-soroush commented 11 months ago

Not stale. Waiting for the core team to review the linked PR.