Add comprehensive integration tests covering:
- Peer-aggregated discovery merging across multiple API servers
- CRD/APIService exclusion from peer discovery
- Profile-based content negotiation (nopeer)
- Cache invalidation on local discovery changes
- Request routing to peer servers
Part of KEP-4020: Unknown Version Interoperability Proxy
Wire up peer proxy infrastructure in kube-apiserver:
- Add UnknownVersionInteroperabilityProxy feature gate
- Configure peer proxy with identity lease selectors
- Register CRD and APIService informers with exclusion filters
- Start peer discovery sync and GV cleanup workers
Includes extractors for CRDs and APIServices to identify which
GroupVersions should be excluded from peer discovery.
Part of KEP-4020: Unknown Version Interoperability Proxy
Integrate peerproxy and peer-aggregated discovery into generic API server:
- Add PeerProxyConfiguration to server config
- Wire up peer discovery cache sync as post-start hook
- Connect local discovery invalidation callbacks
- Add GV deletion workers and reaper for safe cleanup
Part of KEP-4020: Unknown Version Interoperability Proxy
Add callback mechanism to notify peer-aggregated discovery handler
when local discovery changes, enabling efficient cache invalidation.
Part of KEP-4020: Unknown Version Interoperability Proxy
Implement peer-aggregated discovery that merges local and peer discovery
documents into a unified view. Features:
- Deterministic merging using topological sort
- Short-circuit optimizations when content/order unchanged
- Resource capability merging (verbs, subresources)
- ETag-based caching
- Prometheus metrics for cache hits/misses
The wrapper routes requests to either local-only or peer-aggregated
handlers based on Accept header profile.
Part of KEP-4020: Unknown Version Interoperability Proxy
Add support for 'profile=nopeer' in Accept headers to allow clients
to opt out of peer-aggregated discovery and request local-only results.
Updates discovery client to set appropriate Accept headers based on
whether peer-aggregated discovery is desired.
Part of KEP-4020: Unknown Version Interoperability Proxy
Add a topological sort implementation that merges multiple ordered lists
while preserving their relative ordering. This is used by peer-aggregated
discovery to deterministically merge discovery documents from multiple
API servers.
Part of KEP-4020: Unknown Version Interoperability Proxy
The test started without waiting for the ResourceSlice informer to have
synced. As a result, the "CEL-runtime-error-for-one-of-three-nodes" test case
failed randomly with a very low flake rate (less than 1% in local runs) because
CEL expressions never got evaluated due to not having the slices (yet).
Other tests also were less reliable, but not known to fail.
`defer klog.V().Info` logs parameters *as they were at the time of the defer*.
What we want is to defer a function which passes the values *at the time of exit*.
Extend Fit and BalancedAllocation PreScore state with the the
allocated state, the list of ResourceSlices and the device class
mapping. Gather these once during PreScore and pass them through
the scoring path instead of re-fetching for every scoring call.
This should speed up scoring of DRA extended resources, lowering
scheduling overhead.
Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
Co-authored-by: Maciej Skoczeń <mskoczen@google.com>
Co-authored-by: Dominik Marciński <gmidon@gmail.com>