Merge pull request #91637 from robscott/endpointslice-mirroring

Adding new EndpointSlice Mirroring Controller

Kubernetes-commit: 4efed0327654afd66346b58ae33f1f6432a274e2
This commit is contained in:
Kubernetes Publisher 2020-07-10 10:19:48 -07:00
commit 65e7927de5
5 changed files with 52 additions and 10 deletions

6
Godeps/Godeps.json generated
View File

@ -540,15 +540,15 @@
},
{
"ImportPath": "k8s.io/api",
"Rev": "02047b7ecbbf"
"Rev": "8b4834896b7c"
},
{
"ImportPath": "k8s.io/apimachinery",
"Rev": "106aebdc1c0a"
"Rev": "2a468d8caa46"
},
{
"ImportPath": "k8s.io/client-go",
"Rev": "5ab99756f65d"
"Rev": "cf11d9b71ab7"
},
{
"ImportPath": "k8s.io/component-base",

View File

@ -114,6 +114,9 @@ type KubeControllerManagerConfiguration struct {
// EndpointSliceControllerConfiguration holds configuration for
// EndpointSliceController related features.
EndpointSliceController EndpointSliceControllerConfiguration
// EndpointSliceMirroringControllerConfiguration holds configuration for
// EndpointSliceMirroringController related features.
EndpointSliceMirroringController EndpointSliceMirroringControllerConfiguration
// GarbageCollectorControllerConfiguration holds configuration for
// GarbageCollectorController related features.
GarbageCollectorController GarbageCollectorControllerConfiguration
@ -319,6 +322,27 @@ type EndpointSliceControllerConfiguration struct {
EndpointUpdatesBatchPeriod metav1.Duration
}
// EndpointSliceMirroringControllerConfiguration contains elements describing
// EndpointSliceMirroringController.
type EndpointSliceMirroringControllerConfiguration struct {
// mirroringConcurrentServiceEndpointSyncs is the number of service endpoint
// syncing operations that will be done concurrently. Larger number = faster
// endpoint slice updating, but more CPU (and network) load.
MirroringConcurrentServiceEndpointSyncs int32
// mirroringMaxEndpointsPerSubset is the maximum number of endpoints that
// will be mirrored to an EndpointSlice for an EndpointSubset.
MirroringMaxEndpointsPerSubset int32
// mirroringEndpointUpdatesBatchPeriod can be used to batch EndpointSlice
// updates. All updates triggered by EndpointSlice changes will be delayed
// by up to 'mirroringEndpointUpdatesBatchPeriod'. If other addresses in the
// same Endpoints resource change in that period, they will be batched to a
// single EndpointSlice update. Default 0 value means that each Endpoints
// update triggers an EndpointSlice update.
MirroringEndpointUpdatesBatchPeriod metav1.Duration
}
// GarbageCollectorControllerConfiguration contains elements describing GarbageCollectorController.
type GarbageCollectorControllerConfiguration struct {
// enables the generic garbage collector. MUST be synced with the

View File

@ -157,6 +157,23 @@ func (in *EndpointSliceControllerConfiguration) DeepCopy() *EndpointSliceControl
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EndpointSliceMirroringControllerConfiguration) DeepCopyInto(out *EndpointSliceMirroringControllerConfiguration) {
*out = *in
out.MirroringEndpointUpdatesBatchPeriod = in.MirroringEndpointUpdatesBatchPeriod
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSliceMirroringControllerConfiguration.
func (in *EndpointSliceMirroringControllerConfiguration) DeepCopy() *EndpointSliceMirroringControllerConfiguration {
if in == nil {
return nil
}
out := new(EndpointSliceMirroringControllerConfiguration)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GarbageCollectorControllerConfiguration) DeepCopyInto(out *GarbageCollectorControllerConfiguration) {
*out = *in
@ -307,6 +324,7 @@ func (in *KubeControllerManagerConfiguration) DeepCopyInto(out *KubeControllerMa
out.DeprecatedController = in.DeprecatedController
out.EndpointController = in.EndpointController
out.EndpointSliceController = in.EndpointSliceController
out.EndpointSliceMirroringController = in.EndpointSliceMirroringController
in.GarbageCollectorController.DeepCopyInto(&out.GarbageCollectorController)
in.HPAController.DeepCopyInto(&out.HPAController)
out.JobController = in.JobController

8
go.mod
View File

@ -5,13 +5,13 @@ module k8s.io/kube-controller-manager
go 1.13
require (
k8s.io/apimachinery v0.0.0-20200709130442-106aebdc1c0a
k8s.io/apimachinery v0.0.0-20200709170343-2a468d8caa46
k8s.io/component-base v0.0.0-20200709132518-0307e6fabed6
)
replace (
k8s.io/api => k8s.io/api v0.0.0-20200709130931-02047b7ecbbf
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20200709130442-106aebdc1c0a
k8s.io/client-go => k8s.io/client-go v0.0.0-20200709131500-5ab99756f65d
k8s.io/api => k8s.io/api v0.0.0-20200710210618-8b4834896b7c
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20200709170343-2a468d8caa46
k8s.io/client-go => k8s.io/client-go v0.0.0-20200709170953-cf11d9b71ab7
k8s.io/component-base => k8s.io/component-base v0.0.0-20200709132518-0307e6fabed6
)

6
go.sum
View File

@ -352,9 +352,9 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
k8s.io/api v0.0.0-20200709130931-02047b7ecbbf/go.mod h1:lt1s4IKF4+kDlOlxxSmcNyf8j64o27uSvvnZ8BcI0FQ=
k8s.io/apimachinery v0.0.0-20200709130442-106aebdc1c0a/go.mod h1:EjWiYOPi+BZennZ5pGa3JLkQ+znhEOodGy/+umjiLDU=
k8s.io/client-go v0.0.0-20200709131500-5ab99756f65d/go.mod h1:FtCso/qJj5wuFWDAKCISjGDjJHrTHf7nwTkERLsat8k=
k8s.io/api v0.0.0-20200710210618-8b4834896b7c/go.mod h1:k9aZpMcgg/E7OmKDCPRlyut8Asqbv6G2h+8byeS4d/E=
k8s.io/apimachinery v0.0.0-20200709170343-2a468d8caa46/go.mod h1:EjWiYOPi+BZennZ5pGa3JLkQ+znhEOodGy/+umjiLDU=
k8s.io/client-go v0.0.0-20200709170953-cf11d9b71ab7/go.mod h1:FtCso/qJj5wuFWDAKCISjGDjJHrTHf7nwTkERLsat8k=
k8s.io/component-base v0.0.0-20200709132518-0307e6fabed6/go.mod h1:lQ/9An+y9iOlhPTG5kYt9ZeucKAGeUudZClkA7Wanh4=
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/klog/v2 v2.0.0 h1:Foj74zO6RbjjP4hBEKjnYtjjAhGg4jNynUdYF6fJrok=