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.
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
.