From 1799a10396f88a1cc710a0ed0b69eff67737130c Mon Sep 17 00:00:00 2001 From: Scot Wells Date: Sat, 23 May 2026 11:11:13 -0500 Subject: [PATCH] fix: disable APF feature flag to prevent readyz-blocking informers The previous fix (nil FlowControl after ApplyTo) was incomplete. FeatureOptions.ApplyTo calls utilflowcontrol.New(), which registers FlowSchema and PriorityLevelConfiguration event handlers on the shared informer factory before FlowControl is ever set. Those informers then appear in the informer-sync readyz check and block readyz indefinitely because the IPAM apiserver has no access to flowcontrol.apiserver.k8s.io. Setting EnablePriorityAndFairness=false before ApplyTo prevents utilflowcontrol.New() from being called at all, so the informers are never registered. Co-Authored-By: Claude Sonnet 4.6 --- cmd/ipam/serve.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/ipam/serve.go b/cmd/ipam/serve.go index 802f7be..c52e691 100644 --- a/cmd/ipam/serve.go +++ b/cmd/ipam/serve.go @@ -170,6 +170,12 @@ func NewIPAMServerOptions() *IPAMServerOptions { opts.RecommendedOptions.Admission.RecommendedPluginOrder = []string{} opts.RecommendedOptions.Admission.DefaultOffPlugins = nil + // APF is handled by the main kube-apiserver. Disabling it here prevents + // FeatureOptions.ApplyTo from calling utilflowcontrol.New(), which registers + // FlowSchema and PriorityLevelConfiguration informers on the shared informer + // factory. Those informers never sync (no APF access), blocking readyz. + opts.RecommendedOptions.Features.EnablePriorityAndFairness = false + return opts } @@ -231,12 +237,6 @@ func (o *IPAMServerOptions) Config() (*ipamapiserver.Config, error) { return nil, fmt.Errorf("apply recommended options: %w", err) } - // Delegating aggregated apiservers defer API Priority and Fairness to the - // main kube-apiserver. ApplyTo may re-initialize FlowControl, so nil it - // out here (after ApplyTo) to prevent the FlowSchema and - // PriorityLevelConfiguration informers from blocking readyz. - genericConfig.FlowControl = nil - codec := ipamapiserver.Codecs.LegacyCodec(ipamapiserver.Scheme.PrioritizedVersionsAllGroups()...) pgGetter, err := pgstore.NewRESTOptionsGetter(o.PostgresDSN)