Commit Graph

13 Commits

Author SHA1 Message Date
Antonio Ojea
ef6d9edea5 endpointslicemirroring handle endpoints with multiple subsets
Endpoints generated by the endpoints controller are in the canonical
form, however, custom endpoints can not be in canonical format
(there was a time they were canonicalized in the apiserver, but this
caused performance issues because the endpoint controller kept
updating them since the created endpoint were different than the
stored one due to the canonicalization)

There are cases where a custom endpoint may generate multiple slices
due to the controller, per example, when the same address is present
in different subsets.

The endpointslice mirroring controller should canonicalize the
endpoints subsets before start processing them to be consistent
on the slices generated, there is no risk of hotlooping because
the endpoint is only used as input.

Change-Id: I2a8cd53c658a640aea559a88ce33e857fa98cc5c
2022-12-10 11:44:10 +00:00
Kubernetes Prow Robot
6acc62da75
Merge pull request #99997 from JornShen/extract_ep_and_epm_share_code_to_pkg
Extracting same code of endpointslice and endpointslicemirror into a new shared EndpointSlice package
2021-07-05 13:25:38 -07:00
Dakshraj Sharma
211485c23d last-applied-config annotation no longer mirrored to endpoint slices
Handles incorrect mirroring of endpoint annotations to created endpoint
slices, specifically the last-applied-config. Also updates tests
and adds test cases for the same
2021-06-15 22:32:33 +05:30
Antonio Ojea
3ac8d8c9ce endpointslicemirroring controller mirror address status
Fix a bug on the endpoint slice mirroring controller where the
endpoints not ready addresses were mirrored as ready.
2021-06-08 09:51:59 +02: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
fd51e654af cleanup: fix errors in wrapped format and log capitalization in controller
Signed-off-by: wangyx1992 <wang.yixiang@zte.com.cn>
2021-04-22 15:40:54 +08:00
Antonio Ojea
c421e22e2c slice mirroring controller mirror annotations
Add support to the endpoint slice mirroring controller to mirror
annotations, in addition to labels, but don´t mirror endpoint
triggertime annotation.

Also, fix a bug in the endpointslice mirroring controller, that
wasn't updating the mirrored slice with the new labels, in case
that only the endpoint labels were modified.
2021-03-08 23:20:08 +01: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
Rob Scott
06db357e06
Updating EndpointSliceMirroring controller to wait for cache to be updated
This matches the recent updates to the EndpointSliceTracker for the
EndpointSlice controller in #99345 that accomplished the same thing.
2021-03-04 09:16:41 -08:00
Rob Scott
4cfe4403b4
Updating EndpointSlice controllers to return if error encountered
Previously the controllers would proceed with additional creates,
updates, or deletes if 1 failed. That could potentially result in
scenarios where an EndpointSlice create or update failing while a delete
worked. This updates the logic so that removals will not happen if
additions fail.
2020-08-12 09:58:03 -07:00
Rob Scott
98b63ad3a6
Fixing memory leak in EndpointSliceMirroring EndpointSlice tracker
This mirrors an earlier fix to the EndpointSlice controller. I'll make a
follow up PR to move this component to a shared package, but that seems
beyond the scope of a bug fix PR.
2020-07-24 17:21:36 -07:00
Rob Scott
fa59370e93
Adding new logging, event, and metric to better capture when mirroring addresses is skipped 2020-07-06 12:43:35 -07:00
Rob Scott
8691466059
Adding EndpointSliceMirroring controller
This will mirror custom Endpoints to EndpointSlices to ensure that
applications will not need to maintain both separately.
2020-07-06 12:43:33 -07:00