acoustic-carpenter-78188
07/21/2026, 5:43 PMplugins.k8s.default-pod-template-name nor a per-task pod_template_name has any effect (the per-task form fails the task with PodTemplate '<name>' does not exist).
Root cause: pod construction reads the in-memory flytek8s.DefaultPodTemplateStore (getBasePodTemplate in pod_helper.go), but nothing in the v2 runtime ever populates it. In v1 flytepropeller's controller registered a PodTemplate informer wired to `flytek8s.GetPodTemplateUpdatesHandler`; that wiring was never carried over to the v2 executor, so every store lookup returns nil.
What changes were proposed in this pull request?
• `executor/setup.go`: register a PodTemplate informer during executor setup, wired into flytek8s.DefaultPodTemplateStore via the existing GetPodTemplateUpdatesHandler, and set the executor pod namespace as the store's fallback namespace (matching v1 propeller semantics). If the informer fails its initial sync within 2 minutes (e.g. the podtemplates RBAC grant is missing), executor startup fails — silently running with an empty store is exactly the bug this fixes.
• `charts/flyte-binary/templates/clusterrole.yaml`: grant `get`/`list`/`watch` on podtemplates.
How was this patch tested?
• New unit test TestWatchPodTemplatesPopulatesDefaultStore (fake clientset → informer → store): direct-namespace hit, default-namespace fallback, and miss.
• Reproduced and verified end-to-end on an EKS dev cluster:
1. Created a PodTemplate (label + annotation + env on the default container) in the executor namespace and set plugins.k8s.default-pod-template-name.
2. Before the fix: task pods came up without any of the template's label/annotation/env.
3. After deploying this branch's image: task pods carry the template's label, annotation, and env — both with default-pod-template-name and with a per-task pod_template="<name>" (SDK TaskEnvironment(pod_template=...)).
Labels
• fixed: PodTemplates (global default-pod-template-name and per-task pod_template_name) now apply on flyte-binary v2.
flyteorg/flyteacoustic-carpenter-78188
07/21/2026, 9:36 PM