You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support informer names in the kcp cluster informer factory #4518
While preparing the Kubernetes 1.37 patches (kcp-dev/kubernetes-patches#2), upstream's BuildGenericConfig in pkg/controlplane/apiserver/config.go now builds the shared informer factory with clientgoinformers.WithInformerName(informerName), which gives the informers an identity for informer metrics.
The kcp carry (patches/0025-UPSTREAM-carry-generic-cleanup.patch) replaces that factory with the kcp cluster-aware one, kcpinformers.NewSharedInformerFactoryWithOptions(clusterClient, ...). That factory has no equivalent option, so the carry drops the call and leaves a comment:
Upstream additionally sets WithInformerName(informerName) for informer identity metrics; the kcp cluster informer factory does not support informer names (yet), so the identifier is unused here.
Result: informers created through the kcp factory in the generic apiserver config have no name, so they are missing from upstream's informer-identity metrics, and the carry diverges from upstream here.
What to do
Look into supporting informer names in the kcp cluster informer factory and the cluster-aware informers it creates, so the kcp patch can pass WithInformerName(informerName) again. This likely needs a change in the kcp-dev client-go / code-generator output, not only in this repo.
Find where the kcp cluster informer factory (kcpinformers) is generated, and which client-go informer API accepts an informer name
Add a WithInformerName option to the factory options and pass the name through to the underlying informers (scoped and cluster-wide)
Regenerate the informers and bump the dependency in kcp
Restore kcpinformers.WithInformerName(informerName) in the BuildGenericConfig carry patch and delete the explanatory comment
If this is not feasible, record that decision so the divergence from upstream is intentional
Activity