Open mtomwing opened 5 years ago
Ideally too, if --watch-namespace
is defined this would allow redis-operator and redis-cluster to be installed without ClusterRoles. In (our) clusters running in a soft multi-tenancy mode ordinary tenants are generally not permitted to install ClusterRoles unless they are actually providing a cluster wide service. I see other operators such as MySQL operator are supporting these two deployment models in their RBAC config : e.g. https://github.com/oracle/mysql-operator/blob/master/mysql-operator/templates/02-rbac.yaml uses an operator.global
option to determine whether to render ClusterRoles or Roles. As for listing namespaces etc. perhaps that's not needed when running with --watch-namespace
.
@monkeymorgan, @mtomwing I agree with you both, this feature is mandatory in order to run the redis-operator in a multi-tenancy environment. It will not be difficult to implement, I just need to lock some time in order to do it in the coming weeks. Or if one of you feel able and have time to implement this feature, I will be more than happy to help and review your contribution.
It's not a huge amount of work, just e2e
should be revamped to take work on different namespace
s.
This would be useful in situations where someone wants to test out this operator without committing to running it as a cluster service for everyone else.
Simplest approach might be to add an optional
--watch-namespace=<namespace>
flag to the operator. Maybe supporting multiple namespaces.