Kubernetes access controls
The dataplane Helm chart creates
the Kubernetes RBAC resources that Union.ai’s data plane components need. There are three Helm values that decide what it creates:
| Value | Default | Decides |
|---|---|---|
singleNamespace |
true |
Whether tasks and apps run in the (Helm) release namespace, or in a namespace per project and domain. |
namespaces.enabled, namespaces.static |
enabled: false; static lists six names |
Whether the chart pre-creates the namespaces listed in namespaces.static and binds the work-namespace role in each. It applies only when singleNamespace is false. The scope comes from singleNamespace alone. |
commonServiceAccount.enabled |
true |
Whether the Union backend components share one service account or each get their own. |
This page describes dataplane chart 2026.11.4 or later. Earlier versions name the scope value
low_privilege. See Upgrade from low_privilege.
Choose a scope
Single-namespace (singleNamespace: true) |
Multi-namespace (singleNamespace: false) |
|
|---|---|---|
| Work namespaces where tasks and apps run | The (Helm) release namespace | One namespace per project and domain, created by clusterresourcesync, namespaces.static, or your own tooling. |
| Grants in the namespaces where work runs | A Role in the release namespace | A RoleBinding in each work namespace, mapped to one shared ClusterRole |
| Cluster-scoped grants | A fixed list of reads, plus Knative’s reads when app serving is on | The same, plus cluster-wide list and watch for components that watch every work namespace |
| What you must provide | Nothing | Something that creates each work namespace and its RoleBinding. Set clusterresourcesync.enabled: true, list the namespaces in namespaces.static, or use your own tooling. If none of these runs, tasks fail with Forbidden |
| Is the work-namespace role bound in the release namespace? | Yes. The release namespace is also the work namespace | No. Work-namespace grants are never bound in the release namespace |
Choose single-namespace mode when:
- The Union.ai stack is a tenant on a shared cluster, or your policies limit it to one namespace.
- A single namespace for all projects and domains is acceptable.
Choose multi-namespace mode when:
- You want each project and domain isolated in its own namespace, with its own quota and cloud identity.
- The work-namespace role, which carries a wildcard, must stay out of the release namespace.
Monitoring, usage collection, and app serving work in both modes.
A data plane connected from the Union.ai UI on chart 2026.11.4 or later runs in single-namespace mode.
Write singleNamespace as an unquoted boolean. The chart refuses a quoted string such as "false".
Single-namespace mode
Single-namespace mode is the default. You don’t need to set anything:
singleNamespace: trueIn this mode:
- Union.ai’s workloads, tasks and apps included, run in the Helm release namespace. Every grant that can be
namespaced is a Role in the release namespace. The one exception is
<release-ns>-prometheus-apiserver-discovery, a Role indefaultthat Prometheus uses to discover the API server endpoints. - Cluster-scoped reads come from a fixed list, each entry tied to the code that needs it. The list covers nodes, node and API server metrics, namespaces for kube-state-metrics, IngressClass when ingress-nginx is on, and Knative’s informers when app serving is on.
- Cluster-scoped writes are pinned to named objects. The exceptions are
nodeobserverandnode-bootstrap, both off by default, which each remove a startup taint from their own node. - App serving is on by default and adds Knative’s cluster-wide reads, because Knative’s controllers watch
every namespace however their RBAC is written. Set
apps.enabled: falseto drop them.
Single-namespace mode limits what Union.ai’s components can do. It doesn’t make the chart installable by an identity confined to one namespace. The chart still creates ClusterRoles, a PriorityClass, and a CSIDriver. Subcharts such as ingress-nginx and metrics-server, when enabled, create their own cluster RBAC.
Multi-namespace mode
Set singleNamespace: false, and turn on something that creates the work namespaces. The chart ships
examples/values.full-privilege.yaml
with the matching settings. Layer it after your other values files, or set the same values yourself:
singleNamespace: false
# Create a namespace per project and domain as projects are registered,
# and bind Union.ai's work-namespace role in each one.
clusterresourcesync:
enabled: true
prometheus:
kube-state-metrics:
# Collect from every namespace, so task pods in work namespaces are included.
releaseNamespace: falseCreate the work-namespace RoleBinding
Union.ai’s components reach each work namespace through a RoleBinding named <release-ns>-work-ns,
which points at the ClusterRole of the same name. Every work namespace needs this binding. If nothing
creates it, the chart renders without errors but the tasks fail with Forbidden.
Use one or more of these ways to create the namespaces and their bindings:
| Option | Set | Covers |
|---|---|---|
clusterresourcesync |
clusterresourcesync.enabled: true |
Each namespace, as its project is registered |
| The chart | namespaces.enabled: true and a list in namespaces.static |
The namespaces you list, at install and upgrade |
| Your own tooling | Nothing in the chart | Whatever your tooling provisions |
To pre-create namespaces with the chart, list the names your namespace mapping produces. The default
mapping is <project>-<domain>:
singleNamespace: false
namespaces:
enabled: true
static:
- <project>-development
- <project>-staging
- <project>-production
labels:
union.ai/namespace-type: flyte- A namespace in
namespaces.staticgets only the Namespace and the RoleBinding.clusterresourcesyncalso creates theproject-quotaResourceQuota and the workload identity annotation on thedefaultservice account. Create those yourself for a static namespace. - Without the
union.ai/namespace-type: flytelabel, the operator doesn’t copy the image builder configuration into the namespace. - The chart refuses a
namespaces.staticlist that includes the release namespace, and refusesnamespaces.enabled: truewith an empty list. - Namespaces in
namespaces.staticcarryhelm.sh/resource-policy: keep, sohelm uninstallleaves them in place. Argo CD and other GitOps controllers ignore that annotation. Add your controller’s own retention annotation innamespaces.annotations, for exampleargocd.argoproj.io/sync-options: Prune=false,Delete=false.
If your own tooling creates the bindings, copy the subjects from a chart render, such as
helm template ... -f <your-values>.yaml --set namespaces.enabled=true. Don’t write them by hand.
The list changes with the components you enable, and any extra subject gets the whole role.
Confirm the binding
A successful render or sync doesn’t show whether the binding exists. After you register a project, check its namespace:
kubectl get rolebinding <release-ns>-work-ns -n <work-namespace> \
-o jsonpath='{.subjects[*].name}'
kubectl auth can-i create pods -n <work-namespace> \
--as=system:serviceaccount:<release-ns>:<one-of-those-subjects>A missing binding shows up in one of two ways:
- Task pods fail with
Forbidden. - Task pods that use private images fail with
ImagePullBackOff. The pod webhook couldn’t copy the pull secret into the namespace. The error appears only inkubectl logs -n <release-ns> deploy/union-pod-webhook.
If clusterresourcesync creates the bindings, check its logs for errors applying
ab_work_ns_binding.yaml.
Grant reads for CRD-based task plugins
A task plugin that runs a custom resource, such as a Spark application or a Ray job, watches that
resource in every namespace. Only a ClusterRole can authorize that watch. List the custom resources your
plugins use in taskPluginClusterReadRules:
taskPluginClusterReadRules:
- apiGroups: [sparkoperator.k8s.io]
resources: [sparkapplications]
- apiGroups: [ray.io]
resources: [rayjobs, rayclusters]
- apiGroups: [kubernetes.dask.org]
resources: [daskjobs]
- apiGroups: [kubeflow.org]
resources: [pytorchjobs, tfjobs, mpijobs]
- apiGroups: [jobset.x-k8s.io]
resources: [jobsets]The chart grants list and watch on each entry. Single-namespace mode doesn’t need this value.
Limit what clusterresourcesync can write
clusterresourcesync creates RoleBindings, and Kubernetes RBAC can’t limit a write to a set of
namespaces. The chart pins the role it can bind to <release-ns>-work-ns, but not where it can bind it.
A compromised clusterresourcesync could bind that role in any namespace, kube-system included.
To reduce this:
- Set
commonServiceAccount.enabled: false, soclusterresourcesyncruns as its ownunion-clustersync-systemservice account instead of the shared one. - Add an admission policy, for example with Kyverno or OPA Gatekeeper, that limits that service account’s Namespace and RoleBinding writes to your project namespace naming convention.
- Or turn
clusterresourcesyncoff and create the namespaces and bindings with tooling you trust.
Service accounts
By default, Union.ai’s components share one service account, union-system. Prometheus and
kube-state-metrics run as union-operator-prometheus and <release-name>-kube-state-metrics, where
<release-name> is your Helm release name (union-kube-state-metrics for a release named union).
To give each component its own service account, set:
commonServiceAccount:
enabled: falseThis changes which identity holds each grant, not the grants. The rules stay the same, and every component that uses work-ns still gets the whole pooled role, so splitting the accounts leaves work-namespace access as it is. The components then run as operator-system, proxy-system, leaseworker, union-webhook-system, union-clustersync-system,
dataproxy-system, union-imagebuilder, flyteconnector, and, with app serving on, knative-controller,
knative-activator, knative-autoscaler, knative-webhook, and net-kourier.
Each new service account needs a workload identity binding before it can reach object storage: an IRSA trust subject on AWS, a Workload Identity member on GCP, or a federated credential on Azure. Without one, the pods keep running and their storage calls fail.
Fluent Bit keeps the union-system service account unless you also set fluentbit.serviceAccount.name.
Roles the chart creates
The chart names each role for the component and where its rules apply:
<release-ns>-<component>-<slot>. With the release namespace union, the operator’s read-only role in
its own namespace is union-operator-comp-ns-read.
| Slot | Kind | Applies in | Grants |
|---|---|---|---|
comp-ns-read, comp-ns-write |
Role | The release namespace | One component’s access to Union.ai’s own Deployments, Secrets, and ConfigMaps |
work-ns |
ClusterRole and a RoleBinding per work namespace. A Role in single-namespace mode | Each work namespace | Access to tasks, apps, and image builds. One role, shared by every component that declares rules into it |
work-ns-cluster-read |
ClusterRole | Every namespace | list and watch for components that watch every work namespace. Multi-namespace mode only |
cluster-read |
ClusterRole | The cluster | Reads of cluster-scoped resources, such as nodes, and Knative’s informers |
cluster-write |
ClusterRole | The cluster | Writes to named cluster-scoped objects |
The work-ns role holds the combined rules of every component that uses it, including a wildcard on all
resources from the leaseworker and propeller. A component that can create pods in a namespace already
controls that namespace, so the boundary is where the role is bound: only in work namespaces in
multi-namespace mode, and in the release namespace in single-namespace mode.
The chart refuses any rule a component declares with a wildcard verb, or with escalate, impersonate, or
bind. It refuses apiGroups: ["*"] outside work-ns. The one bind it writes is its own, for
clusterresourcesync, pinned to <release-ns>-work-ns.
Roles at the default values
With a Helm release named union in the release namespace union, app serving on, and the default
commonServiceAccount. The kube-state-metrics role takes its name from the release, as
<release-name>-kube-state-metrics:
| Role | Kind | Mode |
|---|---|---|
union-operator-comp-ns-read, union-operator-comp-ns-write |
Role | Both |
union-proxy-comp-ns-read, union-leaseworker-comp-ns-read |
Role | Both |
union-knative-<component>-comp-ns-read, -comp-ns-write |
Role | Both, with app serving on |
union-system-secret, union-operator-prometheus-rbac |
Role | Both |
union-operator-cluster-read |
ClusterRole | Both. Nodes and the API server /metrics endpoint |
union-prometheus-cluster-read, union-kube-state-metrics-cluster-read |
ClusterRole | Both. Node discovery, cAdvisor through the API server proxy, and cluster-scoped metrics |
union-knative-<component>-cluster-read, union-knative-webhook-cluster-write |
ClusterRole | Both, with app serving on. Every webhook write is pinned to a named object |
flyte-webhook-cleanup-union |
ClusterRole and Role | Both. Used by a pre-upgrade hook that deletes webhook objects left by older chart versions, pinned to those objects |
union-prometheus-apiserver-discovery |
Role in default |
Both. Prometheus’ discovery of the API server endpoints |
union-work-ns |
Role | Single-namespace |
union-work-ns |
ClusterRole | Multi-namespace |
union-<component>-work-ns-cluster-read |
ClusterRole | Multi-namespace. The operator, proxy, leaseworker, and pod webhook |
union-clusterresourcesync-cluster-write |
ClusterRole | Multi-namespace, with clusterresourcesync on |
union-secret-read |
Role | Multi-namespace. Secret reads in proxy.secretsNamespace |
union-kube-state-metrics |
Role, or ClusterRole with prometheus.kube-state-metrics.releaseNamespace: false |
Both |
Enabling more components, such as propeller, nodeobserver, or node-bootstrap, adds roles named the
same way.
Prometheus and kube-state-metrics
The chart writes Prometheus’ and kube-state-metrics’ RBAC itself, from the scrape jobs and collectors it
configures. Leave the subcharts’ own RBAC off. The chart refuses to render if you set
prometheus.rbac.create or prometheus.kube-state-metrics.rbac.create to true.
To collect more kube-state-metrics data, add a collector to prometheus.kube-state-metrics.collectors.
The chart grants the reads that collector needs. See Monitoring.
Audit an install
Audit the rendered roles, not the values. Render the chart with your values files:
helm template union unionai/dataplane -n <release-ns> -f <your-values>.yaml > rendered.yamlThe default multi-namespace render has no work namespaces, so <release-ns>-work-ns has no bindings
and an audit that follows bindings reports none of its grants. Add --set namespaces.enabled=true, or
audit a live cluster after the first project sync.
Key each permission on service account, namespace, API group, resource, and verb. A grant in a work namespace doesn’t cover the same grant missing in the release namespace. To see everything one identity can do, list every RoleBinding and ClusterRoleBinding that names it.
Upgrade from low_privilege
Find the row that matches your values on the chart you run now. When you set singleNamespace, remove
low_privilege, because the render fails when the two keys disagree.
| Your values before 2026.11.4 | Change to |
|---|---|
Neither key set, or low_privilege: true |
Nothing. You can rename the key to singleNamespace: true. |
low_privilege: false with namespaces.enabled unset or false |
singleNamespace: true. This install ran single-namespace. If you keep low_privilege: false, it becomes multi-namespace, and every task fails with Forbidden until each work namespace has its RoleBinding. |
low_privilege: false with namespaces.enabled: true |
singleNamespace: false, with namespaces.enabled: true and your namespaces.static list unchanged. Add clusterresourcesync.enabled: true or your own tooling for namespaces outside the list. Set prometheus.kube-state-metrics.releaseNamespace: false so kube-state-metrics collects from the work namespaces. examples/values.full-privilege.yaml sets this and also turns on clusterresourcesync. |
If your own tooling creates work namespaces, create the <release-ns>-work-ns RoleBinding in every existing
one before you upgrade. Before 2026.11.4, a ClusterRoleBinding gave the leaseworker and propeller access to
every namespace. From 2026.11.4, that RoleBinding is their only grant in a work namespace.
Also:
- Keep every name in
namespaces.staticduring this upgrade. The upgrade addshelm.sh/resource-policy: keepto each listed namespace, so a name you drop now is deleted with everything in it. Add names freely, and remove them in a later upgrade. - In multi-namespace mode, list the custom resources of Spark, Ray, Dask, Kubeflow, or JobSet tasks in
taskPluginClusterReadRules. Before 2026.11.4, a cluster-wide grant covered them. - Before 2026.11.4, the chart ignored
commonServiceAccount.enabled: falsein single-namespace mode. From 2026.11.4 it takes effect, so bind each new service account to a cloud identity before you upgrade. - Propeller and
clusterresourcesyncrun as the sharedunion-systemaccount by default. A cloud identity bound to the old propeller or clusterresourcesync account must also trustunion-system. - Set
prometheus.rbac.createandprometheus.kube-state-metrics.rbac.createtofalse, or remove them. From 2026.11.4 the chart refuses to render if either istrue. If you upgrade with--reuse-values, set them tofalseexplicitly: a removed key keeps its old value. - In templated values, replace
.Values.low_privilegewithinclude "singleNamespace" ..
The chart’s migration guide has a values snippet for each case.