Skip to content

feat(actions): run each project-domain in its own namespace - #8226

Draft
madiyar-wayve wants to merge 1 commit into
flyteorg:mainfrom
madiyar-wayve:madiyar/namespace-mapping
Draft

madiyar-wayve wants to merge 1 commit into
flyteorg:mainfrom
madiyar-wayve:madiyar/namespace-mapping

Conversation

@madiyar-wayve

@madiyar-wayve madiyar-wayve commented Oct 22, 2026 •

Copy link
Copy Markdown

Tracking issue

Related to #8051

Why are the changes needed?

v2 runs every TaskAction and its pods in one namespace. v1 could map each project-domain to its own namespace, which teams use to separate quotas, RBAC and secrets.

What changes were proposed in this pull request?

  • New namespaceMapping config: a template with the v1 placeholders, e.g. {{ project }}-{{ domain }}, and createNamespaces (default true; set false when namespaces are provisioned outside Flyte). An empty template keeps today's behaviour.
  • Root TaskActions go to the mapped namespace and children follow their parent. Lookups fall back to the default namespace, so runs started before the mapping was enabled finish where they are and are not launched twice if resubmitted.
  • Watch keys and subscriptions include the namespace and project, since run names are only unique per project-domain.
  • CreateRun rejects project-domains that map to an invalid namespace name, and fails a run whose namespace is missing instead of leaving it queued.
  • Helm values for flyte-binary and flyte-core.

Not in this PR: copying secrets into mapped namespaces (the open question in the issue).

Should go in with #8215, which keeps plugin pod lookups within the job's namespace.

How was this patch tested?

Unit tests for the mapping, in-flight runs, missing namespaces and the same run name in two projects, plus an envtest integration test running a root and child action in a mapped namespace. Also running on our dev cluster with createNamespaces off.

Labels

  • added

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

🤖 Generated with Claude Code

@madiyar-wayve
madiyar-wayve force-pushed the madiyar/namespace-mapping branch from 8048a4c to 37362b3 Compare October 22, 2026 14:37
Add namespaceMapping (template, createNamespaces). Root TaskActions go
to the namespace their project and domain map to; children follow the
parent, and lookups fall back to the old namespace for in-flight runs.
CreateRun rejects invalid names and fails runs whose namespace is
missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madiyar Aitzhanov <madiyar.aitzhanov@wayve.ai>
@madiyar-wayve
madiyar-wayve force-pushed the madiyar/namespace-mapping branch from 37362b3 to af78089 Compare October 22, 2026 16:24

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant