k8s.io/kubernetes@v1.31.0-alpha.0.0.20240520171757-56147500dadc/pkg/controller/endpointslicemirroring/config/types.go (about)

     1  /*
     2  Copyright 2020 The Kubernetes Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package config
    18  
    19  import (
    20  	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    21  )
    22  
    23  // EndpointSliceMirroringControllerConfiguration contains elements describing
    24  // EndpointSliceMirroringController.
    25  type EndpointSliceMirroringControllerConfiguration struct {
    26  	// mirroringConcurrentServiceEndpointSyncs is the number of service endpoint
    27  	// syncing operations that will be done concurrently. Larger number = faster
    28  	// endpoint slice updating, but more CPU (and network) load.
    29  	MirroringConcurrentServiceEndpointSyncs int32
    30  
    31  	// mirroringMaxEndpointsPerSubset is the maximum number of endpoints that
    32  	// will be mirrored to an EndpointSlice for an EndpointSubset.
    33  	MirroringMaxEndpointsPerSubset int32
    34  
    35  	// mirroringEndpointUpdatesBatchPeriod can be used to batch EndpointSlice
    36  	// updates. All updates triggered by EndpointSlice changes will be delayed
    37  	// by up to 'mirroringEndpointUpdatesBatchPeriod'. If other addresses in the
    38  	// same Endpoints resource change in that period, they will be batched to a
    39  	// single EndpointSlice update. Default 0 value means that each Endpoints
    40  	// update triggers an EndpointSlice update.
    41  	MirroringEndpointUpdatesBatchPeriod metav1.Duration
    42  }