Commit Graph

22 Commits

Author SHA1 Message Date
Rob Scott
aa02b7a434
Updating e2e test to check EndpointSlices and Endpoints as well 2022-05-27 21:10:59 +00:00
Antonio Ojea
aa35f6f160 endpoints controller: don't consider terminal endpoints
Terminal pods, whose phase its Failed or Succeeded, are guaranteed
to never regress and to be stopped, so their IPs never should
be published on the Endpoints.
2022-05-27 06:42:58 +02:00
Antonio Ojea
b905c2870b endpointslices: terminal pods doesn't receive enpoints 2022-05-27 06:42:52 +02:00
Quan Tian
906e6d4670 Stop publishing Pod ResourceVersion in Endpoints and EndpointSlice API
The field is not used anywhere and its value may be stale as Endpoints
and EndpointSlice won't be updated if there is only Pod ResourceVersion
change..
2022-03-02 22:12:35 +08:00
Quan Tian
38966453ce Skip updating Endpoints and EndpointSlice if no relevant fields change
When comparing EndpointSubsets and Endpoints, we ignore the difference
in ResourceVersion of Pod to avoid unnecessary updates caused by Pod
updates that we don't care, e.g. annotation update.

Otherwise periodic Service resync would intensively update Endpoints or
EndpointSlice whose Pods have irrelevant change between two resyncs,
leading to delay in processing newly created Services. In a scale
cluster with thousands of such Endpoints, we observed 2 minutes of
delay when the resync happens.
2022-02-18 20:47:27 +08:00
Quan Tian
5bd9892c94 Fix incorrect parameters in EndpointsEqualBeyondHash 2022-02-15 21:30:28 +08:00
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
cyclinder
ab47b8b94b fix some lint error
Signed-off-by: cyclinder <qifeng.guo@daocloud.io>
2021-10-26 13:56:29 +08:00
Swetha Repakula
1925d94b18 Graduate EndpointSlice Controllers to GA
- EndpointSlice controller will stop writing to Topology field
 - EndpointSlice controller will only provide NodeName and Zone on
 EndpointSlices
2021-03-06 15:58:47 -08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Andrew Sy Kim
1c603e90ef endpointslice controller: set new conditions 'accepting' and 'terminating'
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-05 19:18:45 -05:00
Khaled Henidak (Kal)
6675eba3ef
dual stack services (#91824)
* api: structure change

* api: defaulting, conversion, and validation

* [FIX] validation: auto remove second ip/family when service changes to SingleStack

* [FIX] api: defaulting, conversion, and validation

* api-server: clusterIPs alloc, printers, storage and strategy

* [FIX] clusterIPs default on read

* alloc: auto remove second ip/family when service changes to SingleStack

* api-server: repair loop handling for clusterIPs

* api-server: force kubernetes default service into single stack

* api-server: tie dualstack feature flag with endpoint feature flag

* controller-manager: feature flag, endpoint, and endpointSlice controllers handling multi family service

* [FIX] controller-manager: feature flag, endpoint, and endpointSlicecontrollers handling multi family service

* kube-proxy: feature-flag, utils, proxier, and meta proxier

* [FIX] kubeproxy: call both proxier at the same time

* kubenet: remove forced pod IP sorting

* kubectl: modify describe to include ClusterIPs, IPFamilies, and IPFamilyPolicy

* e2e: fix tests that depends on IPFamily field AND add dual stack tests

* e2e: fix expected error message for ClusterIP immutability

* add integration tests for dualstack

the third phase of dual stack is a very complex change in the API,
basically it introduces Dual Stack services. Main changes are:

- It pluralizes the Service IPFamily field to IPFamilies,
and removes the singular field.
- It introduces a new field IPFamilyPolicyType that can take
3 values to express the "dual-stack(mad)ness" of the cluster:
SingleStack, PreferDualStack and RequireDualStack
- It pluralizes ClusterIP to ClusterIPs.

The goal is to add coverage to the services API operations,
taking into account the 6 different modes a cluster can have:

- single stack: IP4 or IPv6 (as of today)
- dual stack: IPv4 only, IPv6 only, IPv4 - IPv6, IPv6 - IPv4

* [FIX] add integration tests for dualstack

* generated data

* generated files

Co-authored-by: Antonio Ojea <aojea@redhat.com>
2020-10-26 13:15:59 -07:00
Dan Winship
e46572ef4b Improve EndpointController's handling of headless services under dual-stack
EndpointController was accidentally requiring all headless services to
be IPv4-only in clusters with IPv6DualStack enabled.

This still leaves "legacy" (ie, IPFamily-less) headless services as
always IPv4-only because the controller doesn't currently have easy
access to the information that would allow it to fix that.
(EndpointSliceController had the same problem already, and still
does.) This can be fixed, if needed, by manually setting IPFamily,
and the proposed API for 1.20 will handle this situation better.
2020-07-17 15:26:21 -04:00
Dan Winship
9fb6e2ef55 Fix Endpoint/EndpointSlice pod change detection
The endpoint controllers responded to Pod changes by trying to figure
out if the generated endpoint resource would change, rather than just
checking if the Pod had changed, but since the set of Pod fields that
need to be checked depend on the Service and Node as well, the code
ended up only checking for a subset of the changes it should have.

In particular, EndpointSliceController ended up only looking at IPv4
Pod IPs when processing Pod update events, so when a Pod went from
having no IP to having only an IPv6 IP, EndpointSliceController would
think it hadn't changed.
2020-07-17 15:22:59 -04:00
Andrew Sy Kim
366dd4af44 EndpointSlice and Endpoints should treat terminating pods the same
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-03-11 13:03:18 -04:00
Rob Scott
a7e589a8c6
Promoting EndpointSlices to beta 2019-11-13 14:20:19 -08:00
Rob Scott
0c7548f020
Setting Hostname from Pods on EndpointSlice to match Endpoints behavior.
This was an oversight in the initial EndpointSlice release. This update
will ensure that Endpoints and EndpointSlices use the same logic to set
the Hostname attribute.
2019-11-07 13:22:54 -08:00
louisgong
2133f9e9ff add service selector cache in endpoint controller and endpointSlice controller 2019-11-06 10:55:26 +08:00
Kubernetes Prow Robot
0c32aa8910
Merge pull request #83257 from robscott/endpointslice-metrics
Adding initial EndpointSlice metrics.
2019-11-05 15:30:31 -08:00
Rob Scott
40423cf18e
Adding owners file for Endpoint controller utils 2019-10-29 11:01:49 -07:00
Rob Scott
724b142f07
Adding initial EndpointSlice metrics. 2019-10-23 17:33:17 -07:00
Rob Scott
75f6c24923
Adding EndpointSlice controller 2019-08-28 21:13:27 -07:00