Commit Graph

63 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
Kubernetes Prow Robot
f979b4094e
Merge pull request #99292 from yangjunmyfm192085/run-test23
replace all occurrences of "node", nodeName to "node", klog.KRef("", nodeName)
2022-03-17 12:22:42 -07: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
JUN YANG
13fa2b1949 replace all occurrences of "node", nodeName to "node", klog.KRef("", nodeName) 2022-01-06 21:19:29 +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
Kubernetes Prow Robot
d16a5e5feb
Merge pull request #106673 from qmloong/qmloong/master
refactor: use utilerrors instead of join error msg
2021-12-07 18:27:22 -08:00
menglong.qi
ea31d7b813 refactor: use utilerrors instead of join error msg 2021-11-28 17:16:17 +08:00
Rob Scott
9813ec7e8a
Updating TopologyCache to disregard unready endpoints in calculations 2021-11-18 13:54:09 -08:00
Kubernetes Prow Robot
376b2150d5
Merge pull request #105874 from cyclinder/Add_func_name_to_comment
fix some lint error
2021-11-09 08:29:47 -08:00
Mike Dame
4960d0976a Wire contexts to Core controllers 2021-11-01 10:29:00 -04:00
cyclinder
ab47b8b94b fix some lint error
Signed-off-by: cyclinder <qifeng.guo@daocloud.io>
2021-10-26 13:56:29 +08:00
Kubernetes Prow Robot
372103f4b8
Merge pull request #100672 from wangyx1992/structured-log
Structured Logging migration: modify logs of controller-manager
2021-09-22 20:27:10 -07:00
jornshen
6c63ef147c extract same code of es and esm to pkg
migrate files:
endpointset.go
endpointslice_tracker.go
endpointslice_tracker_test.go
errors.go
2021-05-14 15:15:35 +08:00
wangyx1992
7175d82a27 Structured Logging migration: modify logs of controller-manager
Signed-off-by: wangyx1992 <wang.yixiang@zte.com.cn>
2021-04-25 11:27:44 +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
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Kubernetes Prow Robot
85ee5fdd90
Merge pull request #87743 from u2takey/master
log pod event when node not ready
2020-04-21 17:25:52 -07:00
leiiwang
c6c18c8fed event pod event when node not ready 2020-04-07 18:24:00 +08: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
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Kubernetes Prow Robot
4d19c6f2ad
Merge pull request #87537 from uthark/oatamanenko/apiversion
Fixes #87506 Add apiVersion to involvedObject
2020-03-04 02:31:47 -08:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Oleg Atamanenko
427f0f9463 Add apiVersion to involvedObject 2020-01-28 09:24:08 -08: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
Kubernetes Prow Robot
8841624982
Merge pull request #81167 from krzysied/node_controller_list
Avoid listing pods in NodeLifecycleController
2019-11-07 07:53:10 -08:00
Krzysztof Siedlecki
9406e5bf2a adding pods lister 2019-11-07 12:02:21 +01:00
Kubernetes Prow Robot
24fb2c1afd
Merge pull request #84280 from gongguan/service_selector_cache
add service selector cache in endpoint and endpointSlice controller
2019-11-06 18:47:00 -08:00
yuxiaobo
81e9f21f83 Correct spelling mistakes
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-11-06 20:25:19 +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
Krzysztof Siedlecki
b1dfa83be6 using pod pointers in node lifecycle controller 2019-10-14 12:44:43 +02:00
Krzysztof Siedlecki
a07a3a6878 adding pods to MarkPodsNotReady parameters 2019-10-02 14:22:58 +02:00
Krzysztof Siedlecki
8f48896709 adding pods to DeletePods parameters 2019-10-02 13:11:23 +02:00
Rob Scott
75f6c24923
Adding EndpointSlice controller 2019-08-28 21:13:27 -07:00
Pingan2017
0a8d7aadc0 update LastTransitionTime for pod ready condition when node become notready 2019-05-21 17:20:08 +08:00
Yu-Ju Hong
bd2301a628 nodelifecycle controller: reconcile node OS/arch labels 2019-03-06 17:26:23 -08:00