Commit Graph

96 Commits

Author SHA1 Message Date
fatkun
eb9bca5f06 Fixed a bug that mistake use newObj as oldObj in endpoint slice update 2020-06-21 16:43:12 +08:00
Kobayashi Daisuke
4ae11dac2e Replace StartLogging(klog.Infof) with StartStructuredLogging(0) 2020-06-15 17:48:35 +09: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
Rob Scott
94e5537fa0
Lengthening initial backoff time for EndpointSlice controller
The EndpointSlice controller has the potential to manage a large number of resources that are updated frequently. Without proper backoffs in place, there is potential for it to unnecessarily overload the API Server with requests. This makes two significant changes: Increasing the base backoff from 5ms to 1s and making all syncs triggered by EndpointSlice changes delayed by at least 1 second to enable batching.
2020-03-25 11:00:00 -07: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
0836b583f7
Merge pull request #85289 from serathius/remove-prometheus-controller-endpointslice
Remove prometheus references from pkg/controller/endpointslice
2020-03-05 02:58:37 -08:00
Kubernetes Prow Robot
c86aec0564
Merge pull request #88745 from mborsz/slice3
Implement simple endpoint slice batching
2020-03-03 03:03:38 -08:00
Maciej Borsz
49b11b5431 Implement simple endpoint slice batching 2020-03-03 08:16:42 +01:00
Marek Siarkowicz
4ea52da628 Remove prometheus references from pkg/controller/endpointslice 2020-02-29 15:10:23 +01:00
Rob Scott
6a33727632
Adding AppProtocol to Service and Endpoints Ports 2020-02-25 17:42:34 -08:00
Quan Tian
c2d3e54551 EndpointSliceTracker should track updated resource version
During EndpointSlice reconcilation, EndpointSliceTracker is supposed to
track expected EndpointSlice resource versions so that external changes
to them can be detected. But it actually tracked the stale resource
version and resulted in every Service was handled twice as it always
received an EndpointSlice update with a different resource version but
was actually created/updated by itself during the first processing.
2020-02-10 21:47:07 +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
Rob Scott
c75787bb77
Fixing Potential Race Condition in EndpointSlice Controller.
This adds a new EndpointSlice tracker to keep track of the expected resource versions of EndpointSlices associated with each Service managed by the EndpointSlice controller. This should prevent a potential race where a syncService call could happen with an incomplete view of EndpointSlices if additions or deletions hadn't fully propagated to the cache yet. Additionally, this ensures that external changes to EndpointSlices will be handled by the EndpointSlice controller.
2019-12-26 12:15:38 -08:00
Rob Scott
4229b99203
Deep copying EndpointSlices in reconciler before modifying them. 2019-11-23 20:57:50 -08:00
Rob Scott
7085d692b7
Reverting managed-by-setup annotation
This ended up causing far more problems than it was worth, especially
given that it just attempted to provide backwards compatibility with
the alpha release.
2019-11-15 11:50:58 -08:00
Rob Scott
a7e589a8c6
Promoting EndpointSlices to beta 2019-11-13 14:20:19 -08:00
Rob Scott
0fa9981e01
Splitting IP address type into IPv4 and IPv6 for EndpointSlices 2019-11-12 09:03:53 -08:00
Kubernetes Prow Robot
5dc87d2919
Merge pull request #83965 from robscott/endpointslice-managed-by
Adding new label to indicate what is managing an EndpointSlice
2019-11-12 03:08:07 -08:00
Kubernetes Prow Robot
7d1f9b440e
Merge pull request #83815 from howardjohn/appprotocol
Add appProtocol to EndpointSlice.Port
2019-11-11 17:48:06 -08:00
Takashi Natsume
e5ad39fbe0 Fix a typo in pkg/controller 2019-11-10 11:24:10 +00:00
Rob Scott
6b8b2ff975
Adding new label to indicate what is managing an EndpointSlice
This adds a new Label to EndpointSlices that will ensure that multiple
controllers or entities can manage subsets of EndpointSlices. This
label provides a way to indicate the controller or entity responsible
for managing an EndpointSlice.

To provide a seamless upgrade from the alpha release of EndpointSlices
that did not support this label, a temporary annotation has been added
on Services to indicate that this label has been initially set on
EndpointSlices. That annotation will be set automatically by the
EndpointSlice controller with this commit once appropriate Labels have
been added on the corresponding EndpointSlices.
2019-11-08 15:34:44 -08:00
John Howard
d00794ca60 Add appProtocol to EndpointSlice.Port 2019-11-08 09:22:50 -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
06a7e9a1f3
Merge pull request #84763 from hwdef/fix-staticcheck6
pkg/controller: fix staticcheck warning
2019-11-07 09:05:17 -08:00
Kubernetes Prow Robot
ca836256c4
Merge pull request #84573 from robscott/endpointslice-publishnotready
Updating EndpointSlices to use PublishNotReadyAddresses from Services.
2019-11-07 04:35:10 -08:00
hwdef
38256df718 pkg/controller: fix staticcheck warning 2019-11-07 16:46:47 +08:00
Rob Scott
ff3cbdb0ad
Updating EndpointSlices to use PublishNotReadyAddresses from Services.
The Service spec includes a PublishNotReadyAddresses field which has
been used by Endpoints to report all matching resources ready. This may
or may not have been the initial purpose of the field, but given the
desire to provide backwards compatibility with the Endpoints API here,
it seems to make sense to continue to provide the same functionality.
2019-11-06 09:11:31 -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
Kubernetes Prow Robot
6a19261e96
Merge pull request #84123 from smarterclayton/terminating_cause
Handle namespace deletion more gracefully in built-in controllers
2019-11-04 07:55:41 -08:00
wojtekt
7b6bcdf780 Autogenerated code 2019-10-24 20:21:00 +02:00
Rob Scott
724b142f07
Adding initial EndpointSlice metrics. 2019-10-23 17:33:17 -07:00
Clayton Coleman
937ef77257
endpoints: If namespace is terminating, drop item immediately
Avoid sending an event to the namespace that is being terminated,
since it will be rejected.
2019-10-20 18:38:59 -04:00
Kubernetes Prow Robot
72d052a444
Merge pull request #81797 from yastij/move-metrics-util
move util/metrics to component-base
2019-10-08 17:08:05 -07:00
Kubernetes Prow Robot
b00f009316
Merge pull request #82996 from tnqn/endpointslice-deletion
Fix EndpointSliceController service deletion processing
2019-10-08 15:42:27 -07:00
Kubernetes Prow Robot
b4489d1709
Merge pull request #82865 from tnqn/endpointslice
Fix wrong comments and inaccurate logs in endpointslice_controller
2019-10-08 15:42:16 -07:00
Yassine TIJANI
c1487840bc move util/metrics to component-base
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-10-08 14:42:31 +02:00
tanjunchen
de3cf23414 remove the repeat word in documents 2019-10-06 23:32:01 +08:00
Rob Scott
30d0eca19f
Adding owners for EndpointSlice controller 2019-09-24 11:45:15 -07:00
Quan Tian
db6bbf2375 Fix EndpointSliceController service deletion processing
syncService shouldn't return error if the service doesn't exist which
means it's triggered by service deletion, otherwise the service would be
enqueued repeatedly even its cleanup has been executed successfully.

This patch makes syncService return nil if the error is NotFound when
getting the service, like the other controllers do.
2019-09-22 10:01:29 -07:00
Quan Tian
c35fd33f42 Fix wrong comments and inaccurate logs in endpointslice_controller 2019-09-19 15:02:02 +08:00
Rob Scott
8f9483d827
Fixing bugs related to Endpoint Slices
This should fix a bug that could break masters when the EndpointSlice
feature gate was enabled. This was all tied to how the apiserver creates
and manages it's own services and endpoints (or in this case endpoint
slices). Consumers of endpoint slices also need to know about the
corresponding service. Previously we were trying to set an owner
reference here for this purpose, but that came with potential downsides
and increased complexity. This commit changes behavior of the apiserver
endpointslice integration to set the service name label instead of owner
references, and simplifies consumer logic to reference that (both are
set by the EndpointSlice controller).

Additionally, this should fix a bug with the EndpointSlice GenerateName
value that had previously been set with a "." as a suffix.
2019-09-04 09:09:32 -07:00
Rob Scott
75f6c24923
Adding EndpointSlice controller 2019-08-28 21:13:27 -07:00