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)