This change introduces improvements to the component compatibility registry:
- Modify the kube-scheduler test server to create a separate ComponentGlobalsRegistry
- Update the compatibility registry to handle multiple flag configurations
- Enhance test cases to support emulation version mapping between components
Various parts of kube-proxy passed around a "hostname", but it is
actually the name of the *node* kube-proxy is running on, which is not
100% guaranteed to be exactly the same as the hostname. Rename it
everywhere to make it clearer that (a) it is definitely safe to use
that name to refer to the Node, (b) it is not necessarily safe to use
that name with DNS, etc.
If you set `trafficDistribution: PreferClose` on a service in a
cluster with no defined zones, then it would add
hints:
forZones:
- name: ""
to each endpoint. This ended up working anyway since kube-proxy would
likewise end up looking for an endpoint for the "" zone, but it's
unnecessary, since you'd get exactly the same behavior by just leaving
all of the endpoints unhinted. (Of course there's no point in using
PreferClose traffic distribution in this case, but this will make
PreferSameNode cleaner.)
Merge TestReconcileHints_trafficDistribution_is_PreferClose and
TestReconcileHints_trafficDistribution_is_nil_or_empty together.
Change the `trafficDistribution: ""` test to `trafficDistribution:
Unknown`, since `""` is not actually a possible value (but we should
still test that unknown values are ignored, to prevent weird skew
bugs).
Fill in the NodeName field in the endpoints. It's not needed yet but
it will be.
Don't use sets for validating port name and zone hint uniqueness,
since constructing a new set each time is likely to be less efficient
than just doing a linear search.
Keep the sets for supportedAddressTypes and supportedPortProtocols
(since they're only constructed once) but switch to the generic set
API.
IDsPerPod is the mapping length of subids for UserNS.
The length must be multiple of 65536.
Default: 65536
Implements kubernetes/enhancements PR 5020 (addendum to KEP-127)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
In tests it is sometimes unavoidable to use the Prometheus types directly,
for example when writing a custom gatherer which needs to normalize data
before testing it. device_taint_eviction_test.go does this to strip
out unpredictable data in a histogram.
With type aliases in a package that is explicitly meant for tests we
can avoid adding exceptions for such tests to the global exception list.
Both the new DeviceTaint.TimeAdded and dropped fields when
the DRADeviceTaints feature is disabled confused the ResourceSlice
controller because what is stored and sent back can be different
from what the controller wants to store.
It's now more lenient regarding TimeAdded (doesn't need to be exact because of
rounding during serialization, only having a value on the server is okay)
and dropped fields (doesn't try to store them again). It also preserves
a server-side TimeAdded when updating slices.