<#7614 [BUG] Executor pod webhook self-registers c...
# flyte-github
a
#7614 [BUG] Executor pod webhook self-registers cluster-wide; disableCreateMutatingWebhookConfig is never read Issue created by moldhouse Problem The v2 executor always registers its pod webhook cluster-wide at startup (observed on v2.0.26 and master): • `executor/pkg/webhook/entrypoint.go`:
Setup
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/flyte