From 4f8784b13af1c772f65587b52c827e84b9633063 Mon Sep 17 00:00:00 2001 From: Maciej Borsz Date: Mon, 2 Mar 2020 21:00:06 +0100 Subject: [PATCH] Implement simple endpoint slice batching Kubernetes-commit: 49b11b5431d01cf9ac954b97cbec51e92d33c7f6 --- config/v1alpha1/types.go | 5 +++++ config/v1alpha1/zz_generated.deepcopy.go | 1 + 2 files changed, 6 insertions(+) diff --git a/config/v1alpha1/types.go b/config/v1alpha1/types.go index 6f1d449..f99980b 100644 --- a/config/v1alpha1/types.go +++ b/config/v1alpha1/types.go @@ -312,6 +312,11 @@ type EndpointSliceControllerConfiguration struct { // added to an EndpointSlice. More endpoints per slice will result in fewer // and larger endpoint slices, but larger resources. MaxEndpointsPerSlice int32 + + // EndpointUpdatesBatchPeriod describes the length of endpoint updates batching period. + // Processing of pod changes will be delayed by this duration to join them with potential + // upcoming updates and reduce the overall number of endpoints updates. + EndpointUpdatesBatchPeriod metav1.Duration } // GarbageCollectorControllerConfiguration contains elements describing GarbageCollectorController. diff --git a/config/v1alpha1/zz_generated.deepcopy.go b/config/v1alpha1/zz_generated.deepcopy.go index 4f94e0b..afbba17 100644 --- a/config/v1alpha1/zz_generated.deepcopy.go +++ b/config/v1alpha1/zz_generated.deepcopy.go @@ -143,6 +143,7 @@ func (in *EndpointControllerConfiguration) DeepCopy() *EndpointControllerConfigu // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EndpointSliceControllerConfiguration) DeepCopyInto(out *EndpointSliceControllerConfiguration) { *out = *in + out.EndpointUpdatesBatchPeriod = in.EndpointUpdatesBatchPeriod return }