Description
Currently it doesn't seem possible to run the mpi-operator
in a subset of namespaces. It's either all namespaces or a specific (single) namespace.
This limitation looks like it comes from Kubernetes itself, where [generated] Informers are either scoped to a single namespace using <factory>.WithNamespace(...)
, or if no namespace is provider, defaults to metav1.NamespaceAll
.
An example (real-world) use-case for running the mpi-operator
in subset of namespaces is when it's deployed to a Kubernetes cluster with tightly controlled cluster-wide permissions. E.g. when obtaining cluster-wide access to Secrets
is non-starter. In such a case, it's still possible to create a namespace-local RoleBinding
, whereby access can be granted to the Service Account running the mpi-operator
for namespace-local secrets. However, because the mpi-operator
operates only in either all namespaces or a single namespace, using namespace-local RoleBindings
isn't expandable beyond a single namespace.