acoustic-carpenter-78188
07/02/2026, 4:38 PMSetup calls createMutationConfig unconditionally.
• webhook.disableCreateMutatingWebhookConfig exists in the config struct (flyteplugins/go/tasks/pluginmachinery/secret/config/config.go) but is read nowhere.
• The generated MutatingWebhookConfiguration (executor/pkg/webhook/pod.go) has no namespaceSelector, matches inject-flyte-secrets: "true" in all namespaces, and uses failurePolicy: Fail.
Impact
Running Flyte 2 alongside a Flyte 1 deployment in the same cluster (a recommended migration setup) breaks Flyte 1: v1 task pods carry the same inject-flyte-secrets label, so the v2 webhook intercepts them, cannot resolve v1 secrets, and rejects the pods (SecretsPodMutator.Mutate returns an admission error when no injector succeeds). failurePolicy: Fail additionally couples v1 pod creation to v2 webhook uptime.
No workaround exists: removing the RBAC permission makes Setup fail fatally, and manual edits to the webhook config are lost because the binary replaces .webhooks on every startup.
Proposed fix
Honor disableCreateMutatingWebhookConfig in Setup, so operators can bring their own namespace-scoped MutatingWebhookConfiguration. Happy to send a PR.
Alternatively or additionally, a config option for a namespaceSelector on the generated webhook would avoid the hand-managed config object entirely.
Note: v1 has the same unscoped self-registration and no flag at all, so the reverse direction (v1 intercepting v2 secret-using pods) would need the same treatment in a v1 maintenance release.
flyteorg/flyteacoustic-carpenter-78188
07/04/2026, 9:51 PM