Make number of workers configurable

This commit is contained in:
Janet Kuo
2018-08-14 15:31:32 -07:00
parent 0a6389e872
commit cbdc9b671f
10 changed files with 99 additions and 2 deletions

View File

@@ -96,6 +96,9 @@ type KubeControllerManagerConfiguration struct {
// ServiceControllerConfiguration holds configuration for ServiceController
// related features.
ServiceController ServiceControllerConfiguration
// TTLAfterFinishedControllerConfiguration holds configuration for
// TTLAfterFinishedController related features.
TTLAfterFinishedController TTLAfterFinishedControllerConfiguration
}
// GenericControllerManagerConfiguration holds configuration for a generic controller-manager
@@ -438,3 +441,10 @@ type PersistentVolumeRecyclerConfiguration struct {
// in a multi-node cluster.
IncrementTimeoutHostPath int32
}
// TTLAfterFinishedControllerConfiguration contains elements describing TTLAfterFinishedController.
type TTLAfterFinishedControllerConfiguration struct {
// concurrentTTLSyncs is the number of TTL-after-finished collector workers that are
// allowed to sync concurrently.
ConcurrentTTLSyncs int32
}

View File

@@ -48,6 +48,9 @@ func SetDefaults_KubeControllerManagerConfiguration(obj *kubectrlmgrconfigv1alph
if obj.SAController.ConcurrentSATokenSyncs == 0 {
obj.SAController.ConcurrentSATokenSyncs = 5
}
if obj.TTLAfterFinishedController.ConcurrentTTLSyncs <= 0 {
obj.TTLAfterFinishedController.ConcurrentTTLSyncs = 5
}
// These defaults override the recommended defaults from the apimachineryconfigv1alpha1 package that are applied automatically
// These client-connection defaults are specific to the kube-controller-manager