Commit Graph

110 Commits

Author SHA1 Message Date
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
Abirdcfly
00b9ead02c cleanup: remove duplicate import
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-07-14 11:25:19 +08:00
Abirdcfly
8e9a896483
cleanup:use append other than for loop
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-06-28 16:31:59 +08:00
Antonio Ojea
b8ba6ab005 endpointslices: node missing on Pod scenario
When a Pod is referencing a Node that doesn't exist on the local
informer cache, the current behavior was to return an error to
retry later and stop processing.
However, this can cause scenarios that a missing node leaves a
Slice stuck, it can no reflect other changes, or be created.
Also, this doesn't respect the publishNotReadyAddresses options
on Services, that considers ok to publish pod Addresses that are
known to not be ready.

The new behavior keeps retrying the problematic Service, but it
keeps processing the updates, reflacting current state on the
EndpointSlice. If the publishNotReadyAddresses is set, a missing
node on a Pod is not treated as an error.
2022-06-22 09:45:16 +02:00
Antonio Ojea
baecb1981e fix metrics for placeholder slice
There is always a placeholder slice.

The ServicePortCache logic was considering always one endpointSlice
per Endpoint, but if there are multiple empty Endpoints, we just
use one placeholder slice, not multiple placeholder slices.
2022-06-22 09:45:02 +02:00
Antonio Ojea
0d9689a55d fix a bug on endpointslices tests comparing the wrong metrics 2022-06-22 09:40:18 +02:00
Spencer Hance
5f8dc48fbe Fix unnecessary recreation of placeholder EndpointSlice
Fixes Issue 108231 by checking `slicesToDelete` in the EndpointSlice
reconciler for a pre-existing placeholder slice.

Also adds a helper function for comparing the slices.
2022-06-14 09:24:38 -07:00
Kubernetes Prow Robot
e8d6b76f8b
Merge pull request #109624 from aryan9600/fix-endpointslice-deletion
Ignore EndpointSlices that are marked for deletion
2022-06-09 00:11:42 -07:00
Sanskar Jaiswal
4314e58ae5 move the ignore logic higher up to the reconciler
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-06-06 09:49:57 +05:30
Kubernetes Prow Robot
03d0e2c338
Merge pull request #110264 from wojtek-t/fix_leaking_goroutines_4
Fix leaking goroutines in multiple integration tests
2022-06-02 03:59:47 -07:00
Kubernetes Prow Robot
22fda4e7ee
Merge pull request #108232 from qmloong/qmloong/chore
fix: remove the redundant count variable
2022-06-01 10:53:40 -07:00
Wojciech Tyczyński
c20f7cc4e1 Clean shutdown of endpoints/endpointslice integration tests 2022-05-30 20:17:35 +02:00
Rob Scott
aa02b7a434
Updating e2e test to check EndpointSlices and Endpoints as well 2022-05-27 21:10:59 +00:00
Kubernetes Prow Robot
34a6a7ca11
Merge pull request #108316 from hyschumi/fix_unnecessary_handlecrash
endpointslice: remove unnecessary HandleCrash
2022-03-07 18:20:34 -08: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
hyschumi
d8536122b9 endpointslice: remove unnecessary HandleCrash 2022-02-24 09:59:09 +08:00
menglong.qi
a1269198ec fix: remove the redundant count variable 2022-02-21 00:32:21 +08:00
Antonio Ojea
60502c9b32 endpointslice: don't try to update topology cache if node informer error 2022-02-11 12:14:01 +01:00
Rob Scott
242c33615e
Improving performance of EndpointSlice controller metrics cache 2021-12-20 10:26:47 -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
Rob Scott
9813ec7e8a
Updating TopologyCache to disregard unready endpoints in calculations 2021-11-18 13:54:09 -08:00
Rob Scott
d7a640d831
Excluding Control Plane Nodes from Topology Hints calculations 2021-10-01 15:12:38 -07:00
llhuii
e7350d126e TopologyAwareHints: add getHintsByZone unit test 2021-09-29 10:39:03 +08:00
llhuii
528cd30145 TopologyAwareHints: fix getHintsByZone bug
The bug could result in the EndpointSlice controller unnecessarily updating
EndpointSlices associated with a Service that had Topology Aware Hints enabled.
2021-09-28 09:02:24 +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
Rob Scott
f24d917d3c
Adding more detailed logging for Topology Hints 2021-09-02 15:46:14 -07:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04: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
cndoit18
51717256f9
fix(timezone): the timezone is standardized to UTC
Signed-off-by: cndoit18 <cndoit18@outlook.com>
2021-06-03 23:55:39 +08: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
Kubernetes Prow Robot
0c054510a8
Merge pull request #101367 from BinacsLee/binacs-controller-endpointslice-cleanup
code cleanup: append slice without check
2021-04-23 19:28:00 -07:00
BinacsLee
d7a4ed9c65 code cleanup: append slice without check 2021-04-22 18:29:30 +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
Rob Scott
50b377fe4e
Updating Topology Aware Hints to support "Auto" value for annotation
Previously only "auto" was supported, a value that was inconsistent with
Kubernetes naming patterns.
2021-03-31 15:58:42 -07:00
Rob Scott
730d7dc1c0
Updating EndpointSlice controllers to avoid duplicate creations
This updates the StaleSlices() method in EndpointSliceTracker to also
ensure that the tracker does not have more slices than have been
provided.

Co-Authored-By: Swetha Repakula <srepakula@google.com>
2021-03-10 13:13:13 -08:00
Rob Scott
1dcf09c1bf
Adding support for TopologyAwareHints to EndpointSlice Controller 2021-03-08 15:37:46 -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
Swetha Repakula
6f5329d4c0 Remove EndpointSliceNodeName feature gate logic
- feature gate has graduated to GA and will always be enabled, so no
 longer need to check if enabled
2021-03-04 09:57:15 -08:00
Swetha Repakula
be2ef551d1 Graduate EndpointSliceNodeName feature gate to GA
- Feature gate can be removed when EndpointSlice v1beta1 is removed
  - Remove test cases where feature gate is disabled
2021-03-03 18:13:51 -08:00
Rob Scott
e1542606c2
Updating EndpointSlice controller to wait for cache to be updated
This updates the EndpointSlice controller to make use of the
EndpointSlice tracker to identify when expected changes are not present
in the cache yet. If this is detected, the controller will wait to sync
until all expected updates have been received. This should help avoid
race conditions that would result in duplicate EndpointSlices or failed
attempts to update stale EndpointSlices. To simplify this logic, this
also moves the EndpointSlice tracker from relying on resource versions
to generations.
2021-03-02 09:43:46 -08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
wzshiming
98eb869d63 Speed up pkg/controller/endpointslice unit tests 2021-02-05 15:28:37 +08:00
Rob Scott
4c9c9bb5a0 Adding myself as an approver for EndpointSlice controller
This also adds me as a reviewer for the Endpoints controller.
2021-01-31 22:34:39 -08:00
Antonio Ojea
561133ccf1 fix slice controller logging for services ipfamily 2021-01-05 12:52:04 +01:00
Rob Scott
84e4b30a3e
Updates related to PR feedback
- Remove feature gate consideration from EndpointSlice validation
- Deprecate topology field, note that it will be removed in future
release
- Update kube-proxy to check for NodeName if feature gate is enabled
- Add comments indicating the feature gates that can be used to enable
alpha API fields
- Add comments explaining use of deprecated address type in tests
2020-11-12 12:30:50 -08:00
Rob Scott
d985438772
Updating EndpointSlice controllers to support NodeName field 2020-11-11 16:50:36 -08:00
Andrew Sy Kim
7cf19e5fb7 endpointslice API: rename 'accepting' condition to 'serving' condition
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-05 19:18:45 -05:00
Andrew Sy Kim
17cf1b4415 endpointslice controller: add test cases to TestSyncServiceFull for terminating endpoints
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-05 19:18:45 -05:00
Andrew Sy Kim
2947f5ce4f endpointslice controller: refactor TestSyncServiceFull to use test tables
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-05 19:18:45 -05:00