Change how project and domain pairs map onto Kubernetes namespaces.

Namespace mapping

By default, Union.ai maps each project-domain pair to a Kubernetes namespace using the pattern {project}-{domain}. For example, the project flytesnacks in domain development runs workloads in namespace flytesnacks-development.

You can customize this mapping by setting the namespace_mapping.template value in your Helm configuration.

Template syntax

The template is not a Go template. The services replace these exact placeholder strings, so keep one space inside each pair of braces ({{project}} is not substituted):

  • {{ project }}: the project name
  • {{ domain }}: the domain name (e.g., development, staging, production)

Examples

Template Project Domain Resulting namespace
{{ project }}-{{ domain }} (default) flytesnacks development flytesnacks-development
{{ domain }} flytesnacks development development
myorg-{{ project }}-{{ domain }} flytesnacks development myorg-flytesnacks-development

Changing namespace mapping after workflows have run will cause existing data in old namespaces to become inaccessible. Plan your namespace mapping before initial deployment.

Data plane configuration

Set the namespace_mapping value at the top level of your dataplane Helm values. This single value cascades to all services that need it: clusterresourcesync, propeller, operator, and executor.

namespace_mapping:
  template: "myorg-{{ `{{ project }}` }}-{{ `{{ domain }}` }}"

The value is rendered by Helm, so the placeholders must be escaped. Wrap each one in a Go raw string inside a Helm action, for example {{ `{{ project }}` }}, so that Helm outputs {{ project }} unchanged for the services to substitute.

How it works

Namespace mapping controls several components:

Component Role
Clusterresourcesync Creates Kubernetes namespaces and per-namespace resources (service accounts, resource quotas) based on the mapping
Propeller Resolves the target namespace when scheduling workflow pods
Operator Resolves the target namespace for operator-managed resources
Executor Resolves the target namespace for task execution
Flyteadmin (control plane) Determines the target namespace when creating V1 executions

All components must agree on the mapping. The dataplane chart’s top-level namespace_mapping value is the canonical source that cascades to clusterresourcesync, propeller, operator, and executor automatically. You should not set per-service overrides.